If this is pure SDL then your method convention is wrong and should be:
Code:
function thread_func(data : Pointer): LongInt; cdecl; // this may change depending on Delphi/Laz and SDL ver
var
 myList : TList;
begin
 myList := TList(data);
 if(not assigned(myList))then
  exit; // triple check and all

 while myList.Count > 0 do 
 begin 
    WriteLn('....');
    MyDate.Delete(0);
 end; 
 SDL_Delay(5000);
 WriteLn('End Thread');
 result := 1; // thread leaves and return this value
end;
Remember, SDL is developed in C not pascal. C uses a different structure when passing variables (heap vs stack vs register) than Delphi/Laz/FPC/Pascal and so you have to tell it the difference. This doesn't make a difference when your not actually using the params, but when you start using them it quits working . I'm guessing your in Delphi, as in Lazarus/FPC the posted code should never have compiled (FPC is very strict) or you have told FPC to act like Delphi (bad coder, no cookie).

If your using the Jedi SDL package there are examples of using the SDL thread. You can also use native threads and simply wrap up the important parts where you actually call SDL in Critical Sections, Mutexs, or Semiphores. Its a bit dated but here is a good read: http://www.eonclash.com/Tutorials/Mu...ey1.1/ToC.html

- Jeremy