lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Thu, Aug 18, 2011 at 17:33, Stefan Reich
<stefan.reich.maker.of.eye@googlemail.com> wrote:
> On Thu, Aug 18, 2011 at 11:47 PM, HyperHacker <hyperhacker@gmail.com> wrote:
>> I think the term you want is "critical section". A thread can ask that
>> it not be interrupted until it finishes some task (delimited by calls
>> to EnterCriticalSection and LeaveCriticalSection or similar). Of
>> course then you have to figure out what to do if a thread gets into an
>> endless loop in that section...
>
> The OS functions will not produce endless loops. We just program them
> properly. :)

Right, but what if I do:
EnterCriticalSection()
while true do end
?

-- 
Sent from my toaster.