[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#23269: Multi-threaded operation, mbrtowc, and "untangle" script [was

From: arnold
Subject: bug#23269: Multi-threaded operation, mbrtowc, and "untangle" script [was Re: bug#23269...]
Date: Thu, 21 Apr 2016 03:55:59 -0600
User-agent: Heirloom mailx 12.4 7/29/08

sur-behoffski <address@hidden> wrote:

> So, I'm not sure if a thread-safe (i.e. locale-safe) version of mbrtowc
> exists; if not, this needs to be addressed before a split-locale,
> multi-threaded version is feasible.  (LC_CTYPE race conditions?)

By definition, mbrtowc is thread safe.  The question relates better
to setlocale(), or rather to the underlying internal locale data. I don't
think the current POSIX model lends itself to multiple locales within
the same process.

I have to wonder if a multi-threaded grep makes sense in any case; it
would be a very suprising change in behavior if output from multiple
files comes out interleaved, instead of in the order the files were
specified on the command line.

My two cents, of course.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]