Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
General
»
Feature requests
»
Mutex islocked?
Print
Pages: [
1
]
Author
Topic: Mutex islocked? (Read 2768 times)
0 Members and 1 Guest are viewing this topic.
Krosan
Newbie
Posts: 10
Mutex islocked?
«
on:
July 18, 2010, 12:57:12 pm »
Hello,
it would be nice too look up if a mutex is locked or not. When you are locking a mutex which is locked you are waiting till it get unlocked?
But if i have some workerhreads and i make mutex on them, i could be able to use everytime a free one. otherwise its waiting till that one i'm handling is free.
i saw such a function at the boost libary the function is called try_lock()
here is the documantation:
http://www.boost.org/doc/libs/1_43_0/doc/html/thread/synchronization.html#thread.synchronization.mutex_concepts
would be nice if you can include it in sfml i think it would be a very nice feature, which makes the multithreading easier.
thanks
Krosan
Logged
Laurent
Administrator
Hero Member
Posts: 32498
Mutex islocked?
«
Reply #1 on:
July 18, 2010, 04:30:24 pm »
SFML is not a complete threading library, it just includes the basic features that it needs. If you need more, you should rather choose another library (boost, or even the next standard library if your compiler already implements it).
Logged
Laurent Gomila - SFML developer
Recruit0
Jr. Member
Posts: 66
Mutex islocked?
«
Reply #2 on:
July 26, 2010, 11:05:43 pm »
I don't think SFML should include threading support built-in. It should focus on media specifically and "outsource" threading to another library.
On second thought... I'm not sure this is feasible with respect to windows. :? Would take more looking into.
Logged
Print
Pages: [
1
]
SFML community forums
»
General
»
Feature requests
»
Mutex islocked?
anything