blynn / nex

Lexer for Go
http://cs.stanford.edu/~blynn/nex/
GNU General Public License v3.0
416 stars 47 forks source link

Thread safety #47

Closed andresrgz closed 6 years ago

andresrgz commented 6 years ago

I'm guessing that Nex is not thread safe if it uses globals, am I wrong? My program needs to be able to parse in multiple threads and I'm wondering if I will need to lock a mutex for every time Lex will be called.

purpleidea commented 6 years ago

Where do you see globals?

andresrgz commented 6 years ago

@purpleidea My bad :man_facepalming: Just because Flex uses globals I wrongly assumed that Nex does too. I should have checked before asking, I apologize for making this issue.

purpleidea commented 6 years ago

no worries, afaik it does not.

On Tue, Oct 24, 2017 at 8:28 PM, Andrés Rodríguez notifications@github.com wrote:

@purpleidea https://github.com/purpleidea My bad 🤦‍♂️ Just because Flex uses globals I wrongly assumed that Nex does too. I should have checked before asking, I apologize for making this issue.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/blynn/nex/issues/47#issuecomment-339176186, or mute the thread https://github.com/notifications/unsubscribe-auth/AAIPs6ohyG46PArANJQ8PnNe_A2BTLoLks5svoCbgaJpZM4QEg5F .