Click here to Skip to main content
15,884,473 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# web browser Pin
Ravi Bhavnani7-May-15 2:57
professionalRavi Bhavnani7-May-15 2:57 
QuestionHelp Needed: Unit Tests with multiple Threads / Concurrency / Correct Locking Pin
Thomas Maierhofer (Tom)7-May-15 0:25
Thomas Maierhofer (Tom)7-May-15 0:25 
AnswerRe: Help Needed: Unit Tests with multiple Threads / Concurrency / Correct Locking Pin
Eddy Vluggen7-May-15 1:14
professionalEddy Vluggen7-May-15 1:14 
GeneralRe: Help Needed: Unit Tests with multiple Threads / Concurrency / Correct Locking Pin
Thomas Maierhofer (Tom)7-May-15 1:52
Thomas Maierhofer (Tom)7-May-15 1:52 
GeneralRe: Help Needed: Unit Tests with multiple Threads / Concurrency / Correct Locking Pin
Eddy Vluggen7-May-15 2:28
professionalEddy Vluggen7-May-15 2:28 
GeneralRe: Help Needed: Unit Tests with multiple Threads / Concurrency / Correct Locking Pin
Thomas Maierhofer (Tom)7-May-15 3:03
Thomas Maierhofer (Tom)7-May-15 3:03 
GeneralRe: Help Needed: Unit Tests with multiple Threads / Concurrency / Correct Locking Pin
Eddy Vluggen7-May-15 5:27
professionalEddy Vluggen7-May-15 5:27 
GeneralRe: Help Needed: Unit Tests with multiple Threads / Concurrency / Correct Locking Pin
Thomas Maierhofer (Tom)7-May-15 9:11
Thomas Maierhofer (Tom)7-May-15 9:11 
Quote:
The only thing you wouldn't have is the path of the threads that are depending on another - that's the kind of dependency I try to avoid altogether.


If I want to test a synchronization primitive - here a Reader Writer lock, how can you avoid thread dependencies? It is all about the behavior on different threads, because that is what synchronization primitives do. Imagine a unit test (in pseudocode) that can perform the same test from scratch. How this may look like?

Quote:
Thomas Maierhofer (Tom) wrote:
Our old approach of concurrency testing does not fit in very well:
I don't see the difference; either you .And(bla) or Assert(bla). As soon as it is repeated on each line, it becomes noise during reading.


Maybe so you're just writing unit tests or maybe you are doing a little TDD. BDD is a slightly different approach. Love it or hate it.

In fact the ConcurrencyTester should work well in TDD and BDD scenarios.

GeneralRe: Help Needed: Unit Tests with multiple Threads / Concurrency / Correct Locking Pin
Eddy Vluggen8-May-15 1:48
professionalEddy Vluggen8-May-15 1:48 
GeneralRe: Help Needed: Unit Tests with multiple Threads / Concurrency / Correct Locking Pin
Thomas Maierhofer (Tom)8-May-15 11:09
Thomas Maierhofer (Tom)8-May-15 11:09 
GeneralRe: Help Needed: Unit Tests with multiple Threads / Concurrency / Correct Locking Pin
Eddy Vluggen9-May-15 4:55
professionalEddy Vluggen9-May-15 4:55 
GeneralRe: Help Needed: Unit Tests with multiple Threads / Concurrency / Correct Locking Pin
Thomas Maierhofer (Tom)9-May-15 6:29
Thomas Maierhofer (Tom)9-May-15 6:29 
GeneralRe: Help Needed: Unit Tests with multiple Threads / Concurrency / Correct Locking Pin
Eddy Vluggen9-May-15 12:17
professionalEddy Vluggen9-May-15 12:17 
QuestionExecute Multiple Commands using Process.StandardInput Pin
Django_Untaken6-May-15 23:56
Django_Untaken6-May-15 23:56 
AnswerRe: Execute Multiple Commands using Process.StandardInput Pin
Sascha Lefèvre7-May-15 0:40
professionalSascha Lefèvre7-May-15 0:40 
GeneralRe: Execute Multiple Commands using Process.StandardInput Pin
Django_Untaken7-May-15 0:47
Django_Untaken7-May-15 0:47 
GeneralRe: Execute Multiple Commands using Process.StandardInput Pin
Sascha Lefèvre7-May-15 1:00
professionalSascha Lefèvre7-May-15 1:00 
GeneralRe: Execute Multiple Commands using Process.StandardInput Pin
Eddy Vluggen7-May-15 1:16
professionalEddy Vluggen7-May-15 1:16 
GeneralRe: Execute Multiple Commands using Process.StandardInput Pin
Django_Untaken7-May-15 1:58
Django_Untaken7-May-15 1:58 
GeneralRe: Execute Multiple Commands using Process.StandardInput Pin
Eddy Vluggen7-May-15 2:18
professionalEddy Vluggen7-May-15 2:18 
GeneralRe: Execute Multiple Commands using Process.StandardInput Pin
Django_Untaken8-May-15 0:00
Django_Untaken8-May-15 0:00 
GeneralRe: Execute Multiple Commands using Process.StandardInput Pin
Eddy Vluggen8-May-15 1:40
professionalEddy Vluggen8-May-15 1:40 
QuestionHow know the state connected for udp client Pin
hasan hadi6-May-15 17:13
hasan hadi6-May-15 17:13 
AnswerRe: How know the state connected for udp client Pin
Dave Kreskowiak6-May-15 17:23
mveDave Kreskowiak6-May-15 17:23 
GeneralRe: How know the state connected for udp client Pin
hasan hadi6-May-15 23:29
hasan hadi6-May-15 23:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.