Hi Vitaliy,

Wow, people are still demanding XP? Ugh. It's honestly dangerous for them
to be using it at this point.

But as to your question: As long as you are using Cap'n Proto in a
single-threaded way, it should be fine to replace the Mutex implementation
with an "empty" implementation that isn't actually safe. In fact, the only
place Cap'n Proto even seriously uses mutexes is in code around dynamic
schema loading, which isn't even supported on Windows today, so it should
be very safe to hollow out the mutex implementation for now.

I'd probably go this route rather than try to use critical sections.
Critical sections are ugly for a lot of reasons.

Note that future versions of Cap'n Proto are going to increasingly rely on
APIs introduced in Vista, particularly for RPC. A surprising number of
really useful API features seem to have been added in Vista...

-Kenton

On Thu, Nov 10, 2016 at 8:29 AM, Vitaliy Bondarchuk <
[email protected]> wrote:

> hi Kenton
>
> I have to run capnproto based code on Windows XP (yes, life is pain.. ).
> So I have to adapt your code of the mutex to XP
>
> 1. May use precreated pool of simple critical sections (which will be used
> on XP only) instead of that Vista's SRW locks? I think nothing bad (maybe
> except performance) happens if lockShared will work as lockExclusive
> 2. If I don't plan to use readers (and of course builders too) from
> multiple threads - may I just create empty mutex implementation?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Cap'n Proto" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> Visit this group at https://groups.google.com/group/capnproto.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/capnproto.

Reply via email to