[phobos] I wrote NamedMutex for IPC
SHOO
zan77137 at nifty.com
Sat May 8 05:47:56 PDT 2010
Sean Kelly さんは書きました:
> On May 7, 2010, at 10:49 AM, SHOO wrote:
>
>> Me challenge at this time is NamedMutex.
>>
>> http://ideone.com/EKYBO
>>
>> The module about IPC is not included in Phobos and druntime at all now.
>> I suggest NamedMutex by this contribution experimentally.
>> NamedMutex can operate like normal Mutex. But NamedMutex allows
>> reference by name over the process.
>> This may help that file locking in CGI, restraint of the multi-running
>> process, etc...
>>
>> What do you think?
>
> I think it's a good idea. I would have created one already, but the differences between Win32 and Posix named mutexes are fairly substantial, and I haven't spent the time to figure out how to hide the differences in a way that would make both camps happy. It would be nice if it were possible to have a SharedCondition class that integrates with this as well, though that may turn out to be a tad tricky.
>
>> I can say with confidence this time. "I do not see Tango at all."
>
> They don't exist in Tango. I know because I created tango.core.sync, which is reflected in core.sync in druntime.
Thank you.
SharedCondition sounds good.
Though I examined it a little, I think impremention of SharedCondition
is difficult because there are not supports from OS.
If there is NamedSemaphore, it may be possible. But the implementation
will become the way that is not so smart even if I implement it by force.
Isn't there good method?
More information about the phobos
mailing list