1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
{$mode objfpc} {$H+} uses {$ifdef unix} cthreads, {$endif} classes ; type tthread1 = class(tthread) public procedure execute; override; end; procedure tthread1.execute; begin end; var thread1: tthread1; begin thread1 := tthread1.create(true); thread1.start; thread1.waitfor; thread1.free; end.