https://github.com/kkazuo/thread.comm.rendezvous.git
git clone 'https://github.com/kkazuo/thread.comm.rendezvous.git'
(ql:quickload :thread.comm.rendezvous)
(let ((rdv (make-rendezvous)))
(bordeaux-threads:make-thread (lambda () (accept-rendezvous rdv)))
(call-rendezvous rdv 2))
Use Quicklisp.
Thread.Comm.Rendezvous provides CSP(Communicating sequential processes) style inter thread communication channel.
All API are MT-Safe.
Currently run only on SBCL and Clozure-CL.
Make and return new rendezvous object.
Send value to and wait until rendezvous acceptor thread.
Return value or acceptor thread's reply value if acceptor has :reply keyword arg.
Return value from passed by rendezvous caller thread.
:reply should be one argument funcallable object. It called after accept call-rendezvous value and before restart call-rendezvous thread. It's evaluated value becomes call-rendezvous thread's return value.
Return rendezvous's name.
Add nickname for this package (:THREAD.COMM.RENDEZVOUS).
Copyright (c) 2011 Kazuo Koga
Licensed under the MIT License. (http://www.opensource.org/licenses/MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.