Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
add regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinNowak committed Dec 12, 2014
1 parent ad8662d commit e75225d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/core/thread.d
Original file line number Diff line number Diff line change
Expand Up @@ -5194,3 +5194,24 @@ version( D_InlineAsm_X86_64 )
fib.call();
}
}

// regression test for Issue 13416
version (FreeBSD) unittest
{
static void loop()
{
pthread_attr_t attr;
pthread_attr_init(&attr);
auto thr = pthread_self();
foreach (i; 0 .. 50)
pthread_attr_get_np(thr, &attr);
pthread_attr_destroy(&attr);
}

auto thr = new Thread(&loop).start();
foreach (i; 0 .. 50)
{
thread_suspendAll();
thread_resumeAll();
}
}

0 comments on commit e75225d

Please sign in to comment.