thank you for the answer :) 1. yes. our project still support xp and when we will dump support of xp we will be happy. but now we have to solve this issue 2. no, I don't use your RPC and probably will not use in near time. Our project is Windows only, I use COM for years here and it fits my needs. may be later i will look on capnproto RPC. 3. I use capnproto only as storage format of values in a nosql database and it works very nice. I don't use a reader from different threads.
Honestly i think that even if there is a case when you have to use a reader from multiple threads I don't clearly understand why you use locks (by the way - exclusive lock here) in the ReaderArena::tryGetSegment method. imho, may be if it possible it's better to initialize reader in his constructor and then keep it immutable. Or. May be it will be nice if even on Vista and later I can create single-thread reader (may by by optional parameter in constructor). So the reader will not spend time for unnecessary lock functions четверг, 10 ноября 2016 г., 23:32:37 UTC+2 пользователь Kenton Varda написал: > > 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] <javascript:>> 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] <javascript:>. >> 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.
