Ignore:
Timestamp:
Feb 8, 2011, 11:02:02 AM (13 years ago)
Author:
george
Message:
Location:
PinConnection
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • PinConnection

    • Property svn:ignore
      •  

        old new  
        11lib
         2backup
  • PinConnection/USerialPort.pas

    r129 r163  
    66
    77uses
    8   Classes, SysUtils, SynaSer, StdCtrls, Dialogs, UCommon;
     8  Classes, SysUtils, SynaSer, StdCtrls, Dialogs, UCommon, UMicroThreading,
     9  DateUtils;
    910
    1011type
     
    2223  { TSerialPortReceiveThread }
    2324
    24   TSerialPortReceiveThread = class(TThread)
     25  TSerialPortReceiveThread = class(TMicroThread)
    2526  public
    2627    Parent: TSerialPort;
     
    154155  FReceiveThread.FreeOnTerminate := False;
    155156  FReceiveThread.Parent := Self;
     157  FReceiveThread.Name := 'SerialPort';
    156158  FReceiveThread.Start;
    157159end;
     
    290292  InBufferUsed := 0;
    291293  with Parent do repeat
    292     try
    293       if InBufferUsed = 0 then Sleep(1);
     294      if InBufferUsed = 0 then MTSleep(1 * OneMillisecond)
     295        else Yield;
    294296      if Active then begin
    295297        InBufferUsed := WaitingData;
     
    305307        end else InBufferUsed := 0;
    306308      end else InBufferUsed := 0;
    307     except
    308       on E: Exception do
    309         if Assigned(ExceptionHandler) then ExceptionHandler(Self, E);
    310     end;
    311309  until Terminated;
    312310end;
Note: See TracChangeset for help on using the changeset viewer.