Quote:
|
Originally Posted by ssǝן‾ʎ
Locks won't help.
|
Sure they will. It is fairly obvious that the reason for these crashes is because multiple threads are trying to modify the state of PAWN at the same time (which is why it is only safe to call functions like amx_Exec from a single thread), but locks are more of a theoretical approach than a practical one, because, as I said, it is most likely impossible to do in the plugin. It might also be counter-intuitive in some cases, because the main thread would simply be interrupted in the scenario I just described.
Quote:
|
Originally Posted by ssǝן‾ʎ
And clearly you are waiting for a message, which will block, instead of polling for a message each server tick, which won't block.
|
Polling for a message as in calling a native? This is actually the part I do not understand. Could you elaborate further on how to remain within the main thread on "each server tick?"
Quote:
|
Originally Posted by ssǝן‾ʎ
And Boost may be simple but it's horribly bloated.
|
Agreed that some parts of it might be bloated, but in my opinion, that is a small trade-off for nice portable code. Plus, some libraries are just incredibly useful to have in any project (and they are not bloated at all)—string algorithms, lexical_cast, shared_ptr, et cetera.