| Anonymous | Login | Signup for a new account | 2013-06-19 19:18 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | ||||||
| 0004554 | OCaml | OCaml general | public | 2008-05-17 05:57 | 2008-09-23 19:41 | ||||||
| Reporter | ogasawara | ||||||||||
| Assigned To | |||||||||||
| Priority | normal | Severity | feature | Reproducibility | always | ||||||
| Status | acknowledged | Resolution | open | ||||||||
| Platform | OS | OS Version | |||||||||
| Product Version | 3.10.2 | ||||||||||
| Target Version | Fixed in Version | ||||||||||
| Summary | 0004554: Patch implementing inter-thread shared variable without creating a new thread. | ||||||||||
| 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'. 1. With 'Cell', we can make ivar, mvar, thread-safe queue, broadcast channel, and timeout event easily. 2. '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 = sig type 'a t val make : unit -> 'a t val init_make : 'a -> 'a t val put : 'a t -> 'a -> unit Event.event val take : 'a t -> 'a Event.event val read : 'a t -> 'a Event.event val overwrite : 'a t -> ('a -> 'a) -> unit Event.event end I'm sending a patch to Event module with some sample code for testing. Thanks, ogasawara | ||||||||||
| Tags | No tags attached. | ||||||||||
| Attached Files | |||||||||||
Notes |
|
|
(0004523) ogasawara (reporter) 2008-06-20 17:15 |
I found that first version patch had several bugs. I have made more tested version and uploaded. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2008-05-17 05:57 | ogasawara | New Issue | |
| 2008-05-17 05:57 | ogasawara | File Added: event_module_patch.tar.gz | |
| 2008-06-20 17:11 | ogasawara | File Added: event_module_patch_2.tar.gz | |
| 2008-06-20 17:15 | ogasawara | Note Added: 0004523 | |
| 2008-09-23 19:41 | doligez | Status | new => acknowledged |
| Copyright © 2000 - 2011 MantisBT Group |