|
-
Nov 17th, 2010, 06:18 AM
#5
Thread Starter
Hyperactive Member
Re: Multi thread WCF
Okay the plot thinkens.
As for initial testing purposes I was self hosting my WCF service, which I though might be casuing some of the single threaded problems. As I'd read in other places that a multithreaed singleton should behave as I belived it to. So I moved it to being hosted in IIS and now when I run two clients with teh above code I get
17/11/2010 11:09:59
410 11:10:01
420 11:10:01
430 11:10:02
450 11:10:02
470 11:10:03
490 11:10:03
510 11:10:04
530 11:10:04
550 11:10:05
570 11:10:05
17/11/2010 11:10:00
440 11:10:02
460 11:10:02
480 11:10:03
500 11:10:03
520 11:10:04
540 11:10:04
560 11:10:05
580 11:10:05
590 11:10:06
600 11:10:06
Which is the mixed up response I expect. So even with singletons you can apparently get multiple clients accessing them at the same time.
Anyway in answer to your question I'm not tied to singletons as is quite early stages of the project so more investigating the best solution. I would suspect though with all I've read I'll probably decide against using a singleton anyway, as it does seem to have some limitations.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|