You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
++invokeCount in example must called under lock or interlocked because:
"The callback method executed by the timer should be reentrant, because it is called on ThreadPool threads. The callback can be executed simultaneously on two thread pool threads if the timer interval is less than the time required to execute the callback, or if all thread pool threads are in use and the callback is queued multiple times."
Type of issue
Code doesn't work
Description
++invokeCount in example must called under lock or interlocked because:
"The callback method executed by the timer should be reentrant, because it is called on ThreadPool threads. The callback can be executed simultaneously on two thread pool threads if the timer interval is less than the time required to execute the callback, or if all thread pool threads are in use and the callback is queued multiple times."
Page URL
https://learn.microsoft.com/en-us/dotnet/api/system.threading.timer?view=net-9.0
Content source URL
https://github.com/dotnet/dotnet-api-docs/blob/main/xml/System.Threading/Timer.xml
Document Version Independent Id
987f743c-c849-522e-b662-e520c1efaed1
Article author
@dotnet-bot
The text was updated successfully, but these errors were encountered: