On 17-apr-2006, at 18:19, Martin v. Löwis wrote:

> Currently, the readdir() call releases the GIL. I believe
> this is not thread-safe, because readdir() does not need
> to be re-entrant; we should use readdir_r where available
> to get a thread-safe version.
>
> Comments?

AFAIK readdir is only unsafe when multiple threads use the same DIR*  
at the same time. The spec[1] seems to agree with me.

It seems to me that this means the implementation of listdir in  
posixmodule.c doesn't need to be changed.

Ronald

[1] : http://www.opengroup.org/onlinepubs/009695399/functions/ 
readdir.html
>
> Regards,
> Martin
> _______________________________________________
> Python-Dev mailing list
> Python-Dev@python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/ 
> ronaldoussoren%40mac.com

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to