Closed joehoyle closed 3 months ago
Yeah, so the SymbolTable
implementation isn't thread-safe at all, can only be used from the main thread.
This is by design right now. Simplest implementation, fastest way to get moving.
Thread safety is on the roadmap but I need to make sure it doesn't have a huge impact on performance, so rather than just putting a Mutex or Lock on it, I want to do some serious digging and benchmarking.
Hope that clears it up!
Adding on to this, there is some ways to work around this but I'm on my phone and on vacation so can't easily share them. 😁
Ok got you, do you know per chance if it's possible to parse on the main thread and send Vec<Statement>
across threads?
Ah no worries, have a good vacation!
If you want, hop in the Discord and we can chat about things in more detail, or Twitter, whatever is easiest!
@joehoyle Going to close this issue – I've actually removed the SymbolTable
logic completely, so anywhere a Symbol
was previously is now just a ByteString
.
Doing somehtign like :
Causes, in some cases
I think I head that PXP Symbol is not thread safe, but I assumed that meant cross-thread communication rather than not working from anything but the main thread?