Commit Graph

44 Commits

Author SHA1 Message Date
Alex Szpakowski b1b4a637b5 Fix a potential crash when a Thread ends (resolves issue #1219). 2016-10-08 10:50:50 -03:00
Alex Szpakowski 0b1bfba493 Use SDL_DetachThread instead of a conditional SDL_WaitThread when a Thread is destroyed. 2016-09-08 23:33:48 -03:00
Alex Szpakowski 46a2e7b85c Happy new year! 🎉 2016-01-01 00:05:06 -04:00
Alex Szpakowski c7b45b3505 Updated copyright for the new year 2014-12-31 19:32:43 -04:00
Alex Szpakowski 1bc8b7346d Added internal thread name support, for use with debuggers. 2014-05-02 08:56:23 -03:00
Alex Szpakowski 3120a0e650 Goodbye 2013, hello 2014! 2014-01-03 17:28:58 -04:00
Alex Szpakowski 113ed1cfe7 Merged SDL2 changes from bartbes/love-experiments/SDL2 into default.
- Added love.system module, including clipboard functions.

- Added custom hardware cursors (love.mouse.newCursor, love.mouse.setCursor.)

- Revamped love.joystick:
-- added Joystick objects and moved love.joystick functions which operated on individual joysticks to methods on the Joystick objects.
-- Added love.joystick.getJoystick and love.joystick.getJoystickCount.
-- Added events for when joysticks are connected and disconnected.
-- Added 'Gamepad' methods to Joystick objects: Joystick:isGamepad, Joystick:getGamepadAxis, and Joystick:isGamepadDown. They're a common abstraction for xbox controller-like joystick across operating systems.

- Added monitor choosing support and "fullscreen desktop" mode to love.window.

- Moved unicode text input events to their own callback function (love.textinput), removed the key repeat functions from love.keyboard and made the second argument of love.keypressed a boolean saying whether the keypress was a repeat.

- liblove now works with love.window and love.graphics in OS X
2013-08-25 16:51:42 -03:00
Bart van Strien 1602c6de7a Make mutex locks slightly more safe in some places (and correct in another...) 2013-08-03 22:13:33 +02:00
Alex Szpakowski 8ac288876d Added Thread:isRunning 2013-07-16 00:18:04 -03:00
Alex Szpakowski 9155b7b0ee Removed dead code for the now-removed Thread:kill 2013-07-08 17:00:47 -03:00
Alex Szpakowski 8d7e0b5629 Time-travelling license text 2013-06-22 03:14:15 -03:00
Bart van Strien c7c5d0ed6b Fix race conditions and deadlocks in Channels (hopefully) (issue #554)
Also, this is a giant commit because of the official Code Style (tm) was applied.

--HG--
branch : minor
2013-01-30 17:15:12 +01:00
Bart van Strien 399a6a6614 Merge in channels from love-experiments
Rewritten love.thread and changed communication
method from weird system before, to channels.

--HG--
branch : minor
2012-07-04 17:15:16 +02:00
Przemysław Grzywacz 1d5fca6f46 Multiple thread backends. 2011-06-08 16:54:35 +02:00
rude 3fe9b2ff16 Reverted module selection feature. This is not really desired.
Users (or lovers) do not get to choose which implementation of
a module they would like to use.

The abstraction is for dealing with portability issues, not
for giving people the ability to choose an alternative
(inferior) backend. The best choice for any platform/situation
should at all times be the *default* for that platform/situation.
If this is not the case; it's a bug (that is easily fixed).

Any module should provide the functionality promised in the docs.
The lover (or user) should not care how, and if [s]he does, [s]he
does still not get to choose.

Also, a related note: duplication of wrapper code is something I
especially wanted to avoid when I first (or should I say ...
"eventually") formed the current architecture.

--HG--
branch : minor
2011-03-26 17:06:05 +01:00
Bart van Strien b4139ffab5 Rename loaders to fit their locations
--HG--
branch : minor
2011-03-13 20:25:35 +01:00
Bart van Strien 2115cf19b9 Fixed a couple of compiler warnings in minor branch
--HG--
branch : minor
2011-03-06 17:09:38 +01:00
Bart van Strien 677df8d4f0 Merge 'default' into 'minor'
--HG--
branch : minor
2011-01-17 11:08:58 +01:00
Bart van Strien 6acacffb66 Threads get/set instead of send/receive (issue #166)
--HG--
branch : minor
2011-01-15 22:26:16 +01:00
Bill Meltsner fde708160e bringing in the new year by changing every 2010 to 2011 2011-01-15 14:40:27 -06:00
rude 9d108d2bde Added missing lua_strlen to ThreadVariant construction. MSVC coerced the 'const char*'-argument into the bool version of the constructor, causing the wrong function to be called. 2011-01-09 16:36:13 +01:00
Bart van Strien 089da5b08d More race conditions, what fun 2011-01-03 22:19:24 +01:00
Bart van Strien ece02577a5 More race conditions (bug #131) 2010-12-31 11:37:50 +01:00
Bart van Strien cfeb01db42 Prevent race condition in thread:receive (bug #131) 2010-12-31 00:44:32 +01:00
Bart van Strien 11ab5600d3 Correctly handle embedded zeros in thread names and ThreadVariants (bug #128) 2010-12-07 19:37:59 +01:00
Bart van Strien fe373075a4 Thread now has access to mutex and cond as well, fixes bug where errors wouldn't get picked up 2010-09-20 00:56:37 +02:00
bart@bartbes.ath.cx 140d3866a3 Removed ineffective and error-prone killthread in thread destructor 2010-05-23 15:36:49 +02:00
bart@bartbes.ath.cx 200d4bc653 It looks like a dirty hack, it probably is, but this fixes the GC 2010-05-20 21:53:50 +02:00
bart@bartbes.ath.cx dbf8301f24 Merge (the hardest merge evahr, thanks rude) 2010-02-25 20:13:50 +01:00
bart@bartbes.ath.cx 051f6f6eaa Switched global thread to love._curthread and made love.thread.getThread() return that 2010-02-25 19:52:00 +01:00
rude 5fca0e9b33 Changed getThreads so that the caller must allocate the memory. 2010-02-24 21:34:55 +01:00
rude 368765820e Changed unnecessary pass-by-value to pass-by-reference. 2010-02-24 21:21:45 +01:00
rude bdafe0e455 Globals?! When did Bartbes the Sex Machine abandon reason for MADNESS? 2010-02-24 20:47:56 +01:00
rude 4ba513b679 Bye-bye ThreadModuleRegistrar. An abstract ThreadModule will do that job. 2010-02-24 20:40:59 +01:00
Bill Meltsner 4ad7634a78 updated the Xcode project with love.thread, and fixed a few gcc warnings 2010-02-22 00:25:51 -05:00
bart@bartbes.ath.cx 75f651c84b getThreads works now (love.thread) 2010-02-16 16:02:07 +01:00
bart@bartbes.ath.cx 8457d461f8 Added a 'main' thread (love.thread) 2010-02-14 19:14:07 +01:00
bart@bartbes.ath.cx 736f7ab1a2 love.thread can now share full userdata 2010-02-14 17:41:11 +01:00
bart@bartbes.ath.cx cc4d737924 Added demand (love.thread) 2010-02-14 11:16:56 +01:00
bart@bartbes.ath.cx 269b70f30c Made receive destructive, added peek (love.thread) 2010-02-14 10:39:42 +01:00
bart@bartbes.ath.cx 2dcd11551c Working communication in love.thread 2010-02-14 10:09:21 +01:00
bart@bartbes.ath.cx 555d542c09 Added ThreadVariant, and uses ThreadData for inter-thread communication, AND removed .o's 2010-02-12 21:25:50 +01:00
rude d084deeebf Added project files for love.thread on Windows. Also a minor fix to make love.thread builable as a standalone DLL. 2010-02-12 20:59:32 +01:00
bart@bartbes.ath.cx 355a94755d Added first version of thread and enabled newFileData 2010-02-12 20:24:39 +01:00