PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Alternate means for Queue.Synchronized Method
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Alternate means for Queue.Synchronized Method
![]() |
Alternate means for Queue.Synchronized Method |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
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 javo2000@snet.net |
|
|
|
#2 |
|
Guest
Posts: n/a
|
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. |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

