| | [ Return to Bugs & Features | Roadmap 2.0 | Post Text | Post File | SVN ⇄ GIT ]
STR #1841
| Application: | FLTK Library |
| Status: | 5 - New |
| Priority: | 1 - Request for Enhancement, e.g. asking for a feature |
| Scope: | 3 - Applies to all machines and operating systems |
| Subsystem: | Unassigned |
| Summary: | consistent guarding: fltk::Unguard,FltkGuard,FltkUnguard |
| Version: | 2.0-feature |
| Created By: | anton146 |
| Assigned To: | Unassigned |
| Fix Version: | Unassigned |
| Update Notification: | |
Trouble Report Files:
[ Post File ]No files
Trouble Report Comments:
[ Post Text ]
| |
| #1 | anton146 00:43 Dec 09, 2007 |
| ATM I use this:
namespace fltk{ struct FltkGuard{ FltkGuard(){fltk::lock();} ~FltkGuard(){fltk::unlock();} }; struct FltkUnguard{ FltkUnguard(){fltk::unlock();} ~FltkUnguard(){fltk::lock();} }; class Unguard{ fltk::Mutex *mutex; public: Unguard(fltk::Mutex &m):mutex(&m){mutex->unlock();} Unguard(fltk::Mutex *m):mutex(m){mutex->unlock();} ~Unguard(){mutex->lock();} }; } | |
[ Return to Bugs & Features | Post Text | Post File ]
|
| |