summaryrefslogtreecommitdiff
path: root/fibers/operations.scm (follow)
Commit message (Expand)AuthorAgeFilesLines
* Rebase fibers on top of schedulers and tasks•••This commit refactors fibers to be based on lighter-weight "tasks", and makes the scheduler API more orthogonal. Now there are no more fiber objects (although the fibers layer could re-add them if they are useful), and fibers no longer have names (although again this could be re-added at an upper layer). Also it's the current scheduler that's bound by a parameter, not the current fiber, and as it's a thread-safe parameter it doesn't need to be bound in each fiber. Andy Wingo2017-08-061-6/+7
* Add block-asyncs in fiber->thread resume path•••* fibers/operations.scm (perform-operation): Block asyncs in resume callback; otherwise the fiber doing the resuming could be scheduled away. Andy Wingo2017-02-201-4/+6
* Fix deprecation warning in (fibers operations)•••* fibers/operations.scm: Use (ice-9 threads). Andy Wingo2017-02-201-0/+5
* Add support for operations from foreign threads•••* tests/foreign.scm: New file. * Makefile.am: Add new file. * fibers/operations.scm (perform-operation): Support blocking operations from foreign threads (without a scheduler). * fibers/timers.scm (timer-sched, *timer-sched*, timer-operation): Add support for timeouts that use an auxiliary thread instead of relying on the current scheduler. Andy Wingo2017-01-051-1/+28
* Centralize operation wrap handling•••* fibers/operations.scm (<base-op>): Update comment. (perform-operation): Wrap resume proc before calling block function. * fibers/channels.scm (put-operation, get-operation): * fibers/timers.scm (timer-operation): Adapt to pre-wrapped resume proc. Andy Wingo2017-01-041-3/+10
* Prepare for support for blocking operations•••* fibers/operations.scm (perform-operation): Block function takes sched and resume function, not fiber. Will allow blocking operations in the future. * fibers/internal.scm (add-timer): Rename from resume-on-timer; just call a thunk after a time has passed. * fibers/timers.scm (timer-operation): Adapt to resume-on-timer and operation changes. * fibers/channels.scm (put-operation, get-operation): Adapt to operation changes. Andy Wingo2017-01-041-16/+22
* Rename choose to choice•••* fibers/operations.scm (choice-operation): Rename from choose-operation. Andy Wingo2016-10-121-3/+3
* Update documentation.Andy Wingo2016-10-121-0/+9
* Reimplement in terms of Parallel Concurrent ML•••* fibers/operations.scm: New file. * fibers/channels.scm: Reimplement in terms of operations (CML events). * tests/basic.scm: Remove channels tests. * tests/channels.scm: Add channels tests. * Makefile.am: Update for new files. Andy Wingo2016-10-031-0/+151