سؤال

What are examples of types of applications or methods that should be reentrant? Or is it something that you should generally strive for?

Also, is it generally a given in (pure) functional programming that your code will be reentrant?

هل كانت مفيدة؟

المحلول

If your code has no side-effects whatsoever (which happens if it's 'purely functional'), it's re-entrant and thread-safe.

In UI development you encounter reentrancy issues. You get one UI event and start a chain of events that may cause the same event to fire before your first handler was done.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top