Re: setting timer

loic-dev_at_gmx.net
Date: 07/06/05


Date: 6 Jul 2005 08:51:22 -0700


> > Well that would be a bit restrictive, actually. You can also call the
> > so-called async-signal-safe functions. The list can be found in SUS,
> > here copied below for your convenience.
>
> Kind of, while these are "safe" there are a lot of unsafe cases. For
> instance close() is "safe" ... but if you close an fd you are using in
> your main application code, you can pretty much guarantee the code is
> unsafe.

This definition of safe has a particular meaning, namely the meaning of
SUSv3. It must be understood like "*If* you do the thing *correctly*,
then it is safe".

That's the same with multi-threading. close() is thread-safe, but if
you close an fd that you are using later in an other thread, then you
will likely have some troubles. But you are not suppose to close an fd
that you are using later, are you?

Regards,
Loic.



Relevant Pages

  • Re: notice and warning
    ... that script lists, edits, deletes users. ... That's just a broken design. ... POST and GET _do_ have a totally different meaning, ... keep your application safe just for the sake of using $_REQUEST. ...
    (comp.lang.php)
  • Re: Concurrency and delegates
    ... It's thread safe in that it won't throw a NullReferenceException. ... there's some behind-the-scenes locking going on? ... the memory models I've seen. ... in fact the close to the recommended practice for thread-safe ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Exploiting Dual Cores with Py_NewInterpreters separated GIL ?
    ... sufficient to make reference counting safe." ... using atomic inc/dec is as thread-safe as a non-COW String implementation ... About the term "thread-safe". ...
    (comp.lang.python)
  • Re: Checking for null in if()
    ... Based on what Alex ... // Or is it just as safe to shorten everything with this? ... int i = UnopenedBeerBottles; ... Usually, if the value has meaning, then the name of a ...
    (microsoft.public.vc.language)
  • Re: Checking for null in if()
    ... is it safe to ... int i = UnopenedBeerBottles; ... Usually, if the value has meaning, then the name of a variable is meaningful, ... a pointer), then it's sufficient to check that there is something rather than ...
    (microsoft.public.vc.language)

Loading