Re: [Mono-dev] Mutex Bug

2014-07-03 Thread Vladimir Dimitrov
I guess I will be having the same problem as you. So why not just use a file in the temp folder with a unique name somehow connected with the locked resource (like company_name-product_name.lck) and just try to open it with no sharing? This together with poling should be enough. Why do you

Re: [Mono-dev] Mutex Bug

2014-07-03 Thread Edward Ned Harvey (mono)
From: Brandon Perry [mailto:bperry.volat...@gmail.com] Does the file have to be written to in real time? Why not perform buffered writes to a memory region, then flush to disk when a satisfiable amount of entropy has been met? Oh - it's not like that. It's transactional. One time,

[Mono-dev] Mutex Bug

2014-07-02 Thread Edward Ned Harvey (mono)
Before anything else ... Can anybody recommend a way to do interprocess mutex? I would like to confirm this is a bug before I go create a bug report in bugzilla. Can anybody please confirm both (a) you get the same behavior, and (b) it's not correct behavior? I want to make this observation

Re: [Mono-dev] Mutex Bug

2014-07-02 Thread Zoltan Varga
Hi, mono used to support this functionality, but the code to do that was very problematic, and it is disabled in recent mono releases. Zoltan On Wed, Jul 2, 2014 at 9:31 PM, Edward Ned Harvey (mono) edward.harvey.m...@clevertrove.com wrote: Before anything else ... Can anybody

Re: [Mono-dev] Mutex Bug

2014-07-02 Thread Edward Ned Harvey (mono)
From: Zoltan Varga [mailto:var...@gmail.com]   mono used to support this functionality, but the code to do that was very problematic, and it is disabled in recent mono releases. Thanks - So - Here's what I'm trying to do. Multiple processes want to read and modify a file, but the file must

Re: [Mono-dev] Mutex Bug

2014-07-02 Thread Brandon Perry
You could use dbus if you don't care about windows. On Wed, Jul 2, 2014 at 3:21 PM, Edward Ned Harvey (mono) edward.harvey.m...@clevertrove.com wrote: From: Zoltan Varga [mailto:var...@gmail.com] mono used to support this functionality, but the code to do that was very problematic,

Re: [Mono-dev] Mutex Bug

2014-07-02 Thread Edward Ned Harvey (mono)
From: Brandon Perry [mailto:bperry.volat...@gmail.com] You could use dbus if you don't care about windows. I care about windows, linux, and mac. I gather, my options are: WCF (poorly supported in mono, right?), Remoting (which is supposed to be deprecated since WCF, right?), DBus (???)

Re: [Mono-dev] Mutex Bug

2014-07-02 Thread Brandon Perry
Do you *have* to write to the same file? I recently had to deal with a similar issue, but I decided to have each thread/process write files that matched a regex, and a coordinating process looking for files that matched the regex to read and consume. So I wrote a file like file-guid.txt for each

Re: [Mono-dev] Mutex Bug

2014-07-02 Thread Brandon Perry
Though now that I think about it, I seem to recall OSX having odd FileWatcher issues, but I was not targeting OSX. On Wed, Jul 2, 2014 at 3:43 PM, Brandon Perry bperry.volat...@gmail.com wrote: Do you *have* to write to the same file? I recently had to deal with a similar issue, but I

Re: [Mono-dev] Mutex Bug

2014-07-02 Thread Miguel de Icaza
Chances are, you are going to need a per-platform system to achieve this. On Wed, Jul 2, 2014 at 4:39 PM, Edward Ned Harvey (mono) edward.harvey.m...@clevertrove.com wrote: From: Brandon Perry [mailto:bperry.volat...@gmail.com] You could use dbus if you don't care about windows. I care

Re: [Mono-dev] Mutex Bug

2014-07-02 Thread Edward Ned Harvey (mono)
From: Brandon Perry [mailto:bperry.volat...@gmail.com] Do you *have* to write to the same file? Yes. Here is the situation: https://tinhatrandom.org An open source, MIT licensed class library aimed at improving crypto random available to the application developer... One of the things we

Re: [Mono-dev] Mutex Bug

2014-07-02 Thread Brandon Perry
Does the file have to be written to in real time? Why not perform buffered writes to a memory region, then flush to disk when a satisfiable amount of entropy has been met? On Wed, Jul 2, 2014 at 10:32 PM, Edward Ned Harvey (mono) edward.harvey.m...@clevertrove.com wrote: From: Brandon Perry