marionnet-dev team mailing list archive
-
marionnet-dev team
-
Mailing list archive
-
Message #00929
[Branch ~marionnet-drivers/ocamlbricks/trunk] Rev 500: Relevant changes in ThreadExtra. Now threads may be also created as futures in order to work with...
------------------------------------------------------------
revno: 500
committer: Jean-Vincent Loddo <loddo@xxxxxxxxxxxxxxxxxxxx>
branch nick: ocamlbricks
timestamp: Sun 2020-04-12 22:04:44 +0200
message:
Relevant changes in ThreadExtra. Now threads may be also created as futures in order to work with them in a more confortable way (using Future.touch and Future.taste).
val create : ?killable:unit -> ('a -> 'b) -> 'a -> Thread.t
val future : ?killable:unit -> ('a -> 'b) -> 'a -> 'b Future.t
Also, added two functions based on Thread.select similar to Unix.read and Unix.recv but giving to the caller a way to exit from the waiting phases. The "exit_door" should be a read descriptor fd0 resulting from a [let fd0, fd1 = Unix.pipe ()]. Providing the option ~exit_door:fd0 the read mechanism will be broken by another thread simply closing fd1 (causing this way an exception of the kind Failure).
modified:
EXTRA/threadExtra.ml
EXTRA/threadExtra.mli
EXTRA/unixExtra.ml
SHELL/linux.ml
SHELL/linux.mli
--
lp:ocamlbricks
https://code.launchpad.net/~marionnet-drivers/ocamlbricks/trunk
Your team marionnet-dev is subscribed to branch lp:ocamlbricks.
To unsubscribe from this branch go to https://code.launchpad.net/~marionnet-drivers/ocamlbricks/trunk/+edit-subscription