PC Review


Reply
Thread Tools Rate Thread

Alternate means for Queue.Synchronized Method

 
 
=?Utf-8?B?Sm9obiBPbGJlcnQ=?=
Guest
Posts: n/a
 
      11th Jun 2005
Is there an alternative under NetCf for Queue.Synchronized Method in the
Systems.Collection?

I have tried the OpenNetCf but without success.

Thanks.
--
John Olbert
(E-Mail Removed)

 
Reply With Quote
 
 
 
 
Sergey Bogdanov
Guest
Posts: n/a
 
      13th Jun 2005
There is no SynchronizedQueue in CF.NET. But if you really need this you
can write the Decorator class like this:

private class SynchronizedQueue : Queue
{
object _syncObj;
Queue _q;

public SynchronizedQueue(Queue q)
{
_syncObj = q.SyncRoot;
_q = q;
}

public override void Enqueue(object v)
{
lock(_syncObj)
{
this._q.Enqueue(v);
}
}

... other methods ...
}





--
Sergey Bogdanov
http://www.sergeybogdanov.com


John Olbert wrote:
> Is there an alternative under NetCf for Queue.Synchronized Method in the
> Systems.Collection?
>
> I have tried the OpenNetCf but without success.
>
> Thanks.

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Synchronized queue? =?Utf-8?B?ZnJtZGV2ZWxvcGVy?= Microsoft VC .NET 1 20th Jun 2007 11:39 PM
System.Collections.Generic.Queue & System.Collections.Queue Synchronized Method nhmark64@newsgroup.nospam Microsoft C# .NET 4 18th Feb 2006 12:09 PM
Thread Safe/Synchronized Queue question Dave Coate Microsoft VB .NET 0 5th May 2005 04:30 AM
What does Queue.Synchronized() return =?Utf-8?B?cm11bnNvbjg=?= Microsoft C# .NET 6 8th Jan 2005 04:12 AM
What is the difference between SyncRoot and Synchronized method in Queue? =?Utf-8?B?Y2hyaXNiZW4=?= Microsoft C# .NET 4 25th Feb 2004 04:16 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:23 PM.