0

the petri net So, i have to implement some petri nets in java and I have to use threads. The Synchronized method is pretty clear when i have to use it just once. The wait/notify method is't really clear for me, so i'm stuck. If anyone could explain it to me how should i do this it would be a really big help.

dawis11
  • 820
  • 1
  • 9
  • 24
  • wait/notify is pretty low-level. You might find it more pleasant to work with [ReentrantLock](https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/ReentrantLock.html) and [Condition](https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/Condition.html). – dnault May 18 '20 at 19:45
  • @dnault ReentrantLock and Condition are even lower. – Alexei Kaigorodov May 19 '20 at 17:30

0 Answers0