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
This is a bug in your own code; Vec.insert(&mut self, index: uint, element: T) is defined as something that will fail “if index is not between 0 and the vector's length (both bounds inclusive).” This means that your code will only run successfully if the four tasks are run in sequence; if they are not, the insert call fails and the mutex is poisoned—once the task has failed, the mutex’s integrity cannot be guaranteed.
Hi folks,
I'm not sure if I messed up here, but since this looks suspicious at runtime and works sometime I thought I gotta raise it here.
The code is as follows:
When I run it on the command line, most of the time it works correctly:
But sometimes this comes up:
Is this expected to happen? I'm on rustc 0.12.0-pre-nightly (f15d6d2 2014-07-20 22:46:29 +0000)
The text was updated successfully, but these errors were encountered: