grep-devel
[Top][All Lists]
Advanced

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

Re: [Grep-devel] [PATCH 0/4] search backend thread safety


From: Paul Eggert
Subject: Re: [Grep-devel] [PATCH 0/4] search backend thread safety
Date: Sun, 25 Dec 2016 15:58:57 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1

Zev Weiss wrote:

Given that *some* data (e.g. the dfa produced by GEAcompile() and altered in
EGexecute()) is going to need to be replicated per-thread, it seemed simplest to
me to just localize all (non-const) globals across the board

Although that may be simpler in the short run, surely the code should distinguish between objects that are read-only during execution (and can be shared among worker threads) from objects where each thread needs its own copy. This is not merely to help performance; it's to help programmers understand the code better.



reply via email to

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