Quantcast
Viewing all articles
Browse latest Browse all 3816

Preemptive Thread String Crash

In another thread, we were discussing that using Strings in preemptive threads should be safe. I found a way to crash it.

In this, there is a loop on the main thread, and a preemptive thread. Both of them assign a different string to a string (which is a Window Property) and then check to see if the string is what they assigned.

Since this is using a Preemptive thread, we would expect that sometimes the string would be different than what was assigned (since the other thread may have overwritten it).

However, we would not expect an app crash.

Crash log (click for more details)

I’m working on a demo project now.

25 posts - 7 participants

Read full topic


Viewing all articles
Browse latest Browse all 3816

Trending Articles