~chipaca/ubuntuone-windows-installer/miscelanea

« back to all changes in this revision

Viewing changes to src/Canonical.UbuntuOne.ProcessDispatcher/PipeListener.cs

  • Committer: Manuel de la Pena
  • Date: 2010-11-02 22:01:15 UTC
  • mfrom: (84.4.13 performance_iprove)
  • Revision ID: mandel@themacaque.com-20101102220115-3ys5bku6j6ddwpik
Improve performance by removing the use of WCF since is not required right now.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
    /// from the python code and will perform an operation for each messages
31
31
    /// that has been recived. 
32
32
    /// </summary>
33
 
    internal class PipeListener : IPipeListener
 
33
    public class PipeListener : IPipeListener
34
34
    {
35
35
        #region Helper strcut
36
36
 
190
190
                // has been disposed
191
191
                if (IsListening)
192
192
                {
193
 
                    ThreadPool.QueueUserWorkItem(Listen, namedPipeState.NamedPipe);
 
193
                    ThreadPool.QueueUserWorkItem(Listen, namedPipeState);
194
194
                }
195
195
            }
196
196
            catch (PlatformNotSupportedException e)
220
220
                throw new PipeListenerException(
221
221
                    "The number of threads to use to listen to the pipe must be at least one.");
222
222
            }
 
223
            IsListening = true;
223
224
            // we will be using a thread pool that will allow to have the different threads listening to 
224
225
            // the messages of the pipes. There could be issues if the devel provided far to many threads
225
226
            // to listen to the pipe since the number of pipe servers is limited.