Skip to content

Commit

Permalink
Remove scope bound example implementations (#819)
Browse files Browse the repository at this point in the history
Removes ScopeBound... classes to reduce the API surface.

- ScopeBoundCallable: Was intended for event loops. Event loop decorators should instead implement this in a way that fits the specific loop API the best with regard to avoiding unnecessary references to arguments and error handling.
(The implementation was (mostly) sufficient for react/event-loop but shouldn't be used for revolt/event-loop.)
- ScopeBoundPromise: Was only intended as very basic example implementation. An actual implementation has to hook into the specific promise implementation to capture the context of the initial promise.
(I'm not sure how useful promise/future support is in general, there are scenarios where we cannot preserve the context association, e.g. when extracting/awaiting the value.)
  • Loading branch information
Nevay authored Sep 10, 2022
1 parent 6e385b9 commit 776273c
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 248 deletions.
20 changes: 0 additions & 20 deletions src/Context/ScopeBound/ContextHolder.php

This file was deleted.

31 changes: 0 additions & 31 deletions src/Context/ScopeBound/ScopeBoundCallable.php

This file was deleted.

77 changes: 0 additions & 77 deletions src/Context/ScopeBound/ScopeBoundPromise.php

This file was deleted.

33 changes: 0 additions & 33 deletions tests/Unit/Context/ScopeBound/ScopeBoundCallableTest.php

This file was deleted.

87 changes: 0 additions & 87 deletions tests/Unit/Context/ScopeBound/ScopeBoundPromiseTest.php

This file was deleted.

0 comments on commit 776273c

Please sign in to comment.