You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 4554 Reporter: ogasawara Status: acknowledged (set by @damiendoligez on 2008-09-23T17:41:07Z) Resolution: open Priority: normal Severity: feature Version: 3.10.2 Category: otherlibs Tags: patch
Bug description
Hello,
First of all, thanks for the excellent job.
I would like to suggest a new feature about Event module.
Event module provides CML style synchronous communication methods,
but does not support shared variables like ivar, mvar.
These variables are REALLY necessary for multi-thread programming.
So, I have implemented shared variable module called 'Cell'.
With 'Cell', we can make ivar, mvar, thread-safe queue, broadcast channel,
and timeout event easily.
'Cell' dose not create a new thread. This is IMPORTANT. It means the shared
variable is GC target. If the variable has a thread, it is impossible to garbage
collect automatically. But, to make such shared variable with Event module, Cell module is inside of
Event module because implementation detail of Event.event type is needed.
Type of Cell module inside Event module is as follow:
module type Cell=sigtype'a tvalmake : unit -> 'atvalinit_make : 'a -> 'atvalput : 'at -> 'a -> unitEvent.eventvaltake : 'at -> 'aEvent.eventvalread : 'at -> 'aEvent.eventvaloverwrite : 'at -> ('a -> 'a) -> unitEvent.eventend
I'm sending a patch to Event module with some sample code for testing.
This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.
Yes. Domainslib already provides channels (without selective communication a la CML). These features do not (and should not) need to live in the compiler distribution. Hence, it is appropriate to close this one.
Original bug ID: 4554
Reporter: ogasawara
Status: acknowledged (set by @damiendoligez on 2008-09-23T17:41:07Z)
Resolution: open
Priority: normal
Severity: feature
Version: 3.10.2
Category: otherlibs
Tags: patch
Bug description
Hello,
First of all, thanks for the excellent job.
I would like to suggest a new feature about Event module.
Event module provides CML style synchronous communication methods,
but does not support shared variables like ivar, mvar.
These variables are REALLY necessary for multi-thread programming.
So, I have implemented shared variable module called 'Cell'.
With 'Cell', we can make ivar, mvar, thread-safe queue, broadcast channel,
and timeout event easily.
'Cell' dose not create a new thread. This is IMPORTANT. It means the shared
variable is GC target. If the variable has a thread, it is impossible to garbage
collect automatically.
But, to make such shared variable with Event module, Cell module is inside of
Event module because implementation detail of Event.event type is needed.
Type of Cell module inside Event module is as follow:
I'm sending a patch to Event module with some sample code for testing.
Thanks,
ogasawara
File attachments
The text was updated successfully, but these errors were encountered: