On 2/7/17 2:07 PM, Jakub Łabaj via phobos wrote:
I see it like this:
- flockfile - can be @trusted, because no matter when we call it with
correct argument, it won't do anything unsafe

affirmative

- funlockfile - if called by not owning thread, the behaviour is
undefined - so potentially may do something unsafe (I don't know what
> happens if called on not locked file, probably is ignored)

affirmative - in C "undefined" implies "unsafe"

fgetc - when not guarded by lock it is not thread safe, shouldn't be
@trusted

I think you mean fgetc_unlocked? fgetc issues its own locking and unlocking.


Andrei
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos

Reply via email to