hpi-swa / trufflesqueak

A Squeak/Smalltalk VM and Polyglot Programming Environment for the GraalVM.
MIT License
283 stars 14 forks source link

When working with multiple Threads the method cache might encounter race conditions #142

Open janehmueller opened 3 years ago

janehmueller commented 3 years ago

When working with multiple threads (e.g., Java Swing drawing thread) the method cache can encounter a race condition, where the lookup result of one thread is modified by another thread before it is returned. This can cause any kind of errror.

An example fix is here: https://github.com/hpi-swa-lab/trufflesqueak-java-ui/commit/49129896adc9b4fb4bef31eec6d078e696d429ff