由一个线程对象myT创建的多个线程中如何分别设置其优先级?
比如myT:=Thread.Create(false);
myT:=Thread.Create(false);
myT:=Thread.Create(false);
这样会产生3个线程,如何分别设置它们的优先级?????

解决方案 »

  1.   

    Values MeaningtpIdle The thread executes only when the system is idle. The system will not interrupt other threads to execute a thread with tpIdle priority.
    tpLowest The thread's priority is two points below normal.
    tpLower The thread's priority is one point below normal.
    tpNormal The thread has normal priority.
    tpHigher The thread's priority is one point above normal.
    tpHighest The thread's priority is two points above normal.
    tpTimeCritical The thread gets highest priority.
      

  2.   

    There are a few unique properties to identify a thread:
    1.handle
    2.id
    3.You can also add a member variant of any type to do so.
      

  3.   

    otherwise,use the property of the reference like this "myT.Priority",but you should publish it into the open before you use.