Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Is SMC-generated code thread safe?

code safe thread
0
Posted

Is SMC-generated code thread safe?

0

• C: No. • C++: No. • C#: Yes, if you use the SMC -sync option. • Groovy: Yes, if you use the SMC -sync option. • Java: Yes, if you use the SMC -sync option. • Lua: No. • Perl: No. • PHP: No. • Python: No. • Ruby: No. • Scala: Yes, if you use the SMC -sync option. • Tcl: No. • VB.net: Yes, if you use the SMC -sync option. The -sync command line option used with -java and -vb causes SMC to add the synchronized keyword (Java), SyncLock Me/End SyncLock (VB.net) or lock(this){…} (C#) to the transition methods. Therefore, if a transition has been issued from one thread and a second thread attempts to issue a transition before the first thread’s transition has been completed, then the second thread will be blocked until the current transition returns. There are no plans to generate thread-safe Tcl code. It is up to the developer to guarantee that two separate threads cannot issue overlapping transitions.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123