summaryrefslogtreecommitdiff
path: root/fibers/channels.scm (follow)
Commit message (Expand)AuthorAgeFilesLines
* Garbage collect synchronized items from channels put/get queues.•••* fibers/conditions.scm (make-counter, %steps-till-gc, counter-decrement!) (counter-reset!): Moved to new module, counter.scm. * fibers/counter.scm: New file. Rename `%steps-till-gc' to `%countdown-steps'. * Makefile.am: Add counter.scm. * fibers/channels.scm (<channel>, make-channel): Add new slots `getq-gc-counter' and `putq-gc-counter'. (put-operation, get-operation): Garbage collect synchronized items from queues. * fibers/deque.scm (dequeue-filter, dequeue-filter!): New procedures. Christopher Allan Webber2017-08-101-5/+25
* 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-1/+0
* Fix channel CAS logic•••* fibers/channels.scm (put-operation, get-operation): Fix bogus CAS that could cause us to spin in an allocation loop. Andy Wingo2017-02-081-4/+4
* 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-23/+16
* 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-25/+23
* Update documentation.Andy Wingo2016-10-121-16/+30
* Factor out deque implementation•••* fibers/deque.scm: Factor out to helper module. * Makefile.am: Add deque.scm. * fibers/channels.scm: Use (fibers deque). Andy Wingo2016-10-111-48/+1
* Internal channels refactor•••* fibers/channels.scm: Queue is really a deque; refer to it as such. Andy Wingo2016-10-111-27/+28
* 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-78/+306
* Separate public and private fibers interfaces•••* fibers/internal.scm: New file, factored out of (fibers). * fibers.scm: Refactor to be just the public interface. * fibers/channels.scm: * web/server/fibers.scm: * examples/memcached-client.scm: * examples/memcached-server.scm: * examples/ping-client.scm: * examples/ping-server.scm: Adapt to interface changes. * Makefile.am (SOURCES): Add (fibers internal). Andy Wingo2016-09-071-8/+9
* Add channels implementation•••* fibers/channels.scm: New file. * fibers.scm: Add comment. * Makefile.am: Add new file. Andy Wingo2016-09-061-0/+114