![]() |
Re: Suggestion for next year's WPILib
If the auto thread is politely behaved and checking a cancel or other notification, what is the benefit in forking a thread and killing it. It seems to me that the big benefit of killing the thread is to handle code that is spin-locked, yielded, looping to home in on a target, or otherwise not well-behaved.
Statistically, killing the thread will usually work, but if the thread has acquired a mutex, allocated I/O or other other OS resources, how is a chaperone to know what to delete, what to leave open, what to unlock. Plus depending on the implementation, the lock and other items may have thread-local storage, which means the info has been torn down and the chaperone doesn't have the ability to clean up. If enough shadowing is done with WPILib, those resources can be made safe for killing. OS resources would still be an issue, but should be sufficiently rare I'd think. Greg McKaskle |
Re: Suggestion for next year's WPILib
Quote:
VxWorks also has public (inter-process) versions of all these types but we don't use them for FIRST (processes are not used, just kernel mode tasks/threads) Hope this helps |
Re: Suggestion for next year's WPILib
Quote:
Hope this helps |
Re: Suggestion for next year's WPILib
I have a different suggestion for WPILib & WPILibJ:
Make WPILib & WPILibJ as close to the same as possible (and make them make more sense) also, having WPILib and WPILibJ have the same version number would be nice Although I have only looked at the Dashboard and Driverstation classes, they are quite a bit different (and helped cause this error http://www.chiefdelphi.com/forums/sh...2612&page=2#20) 2010: Code:
C++Code:
C++ |
Re: Suggestion for next year's WPILib
Printf() and AddString() are not the same function. C++ has AddString() too, and a function that does the same thing as commit().
But they should be consistent with naming, I guess. |
| All times are GMT -5. The time now is 14:24. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi