CHANGES:

CHANGE 163: BGe 11-Mar-25
   * Fix a compilation warning
   * internal version bumped to 3.17.1

CHANGE 162: BGe 29-Apr-24
   * remove uintptr_t again. I love optional stuff in standard headers
   * expose nil sentinel as lanes.null

CHANGE 161: BGe 15-Apr-24
   * fix keeper state stack accumulating garbage in case of transfer errors

CHANGE 160: BGe 11-Apr-24
   * add manual control over GC behavior in keeper states
   * update a bunch of test scripts
   * minor internal fixes
   * probably the last C implementation update, unless a critical bug creeps up
   * internal version bumped to 3.17.0

CHANGE 159: BGe 19-Mar-24
   * fix small internal issue with when hitting timeout on thread kill during thread_cancel() in pthread implementation

CHANGE 158: BGe 22-Feb-24
   * naive luajit detection in PUC-Lua-based builds, and vice-versa to detect mismatches
   * internal version bumped to 3.16.3

CHANGE 157: Mitalie 17-Aug-23
   * Prevent crash on linux as non-root
   * internal version bumped to 3.16.2

CHANGE 156: BGe 9-Aug-23
   * new configuration option .internal_allocator to help LuaJIT users.
   * internal version bumped to 3.16.1

CHANGE 155: BGe 28-Jul-23
   * tweaks to linux thread priority management: do nothing if not super-user. if super-user, do nothing if nothing is provided (instead of trying to force a prio when LINUX_SCHED_RR is defined).

CHANGE 154: eligovision 1-Mar-22
   * Fix 3-parametrized __lanesclone

CHANGE 153: BGe 17-Feb-22
   * NEVER use allocator obtained from lua_getallocf to allocate stuff manually when compiling for LuaJIT

CHANGE 152: BGe 7-Feb-22
   * bumped version to 3.16.0
   * __lanesclone is now called only once with 3 parameters dest, source, size -> BREAKS CUSTOM DEEP USERDATA API

CHANGE 151: BGe 7-Feb-22
   * bumped version to 3.15.2
   * Lanes no longer relies on malloc/free for internal allocations, but uses the primary alloc function from the master Lua state

CHANGE 150: BGe 22-Sep-21
   * fix require() wrapper to return all values returned by original require()

CHANGE 149: BGe 8-Jul-21
   * bumped version to 3.15.1
   * fix function transfer with lua_dump for Lua 5.4 failing for functions big enough to necessitate a buffer reallocation

CHANGE 148: BGe 23-Jun-21
   * __lanesclone now receives the original as light userdata the first time it is called -> BREAKS CUSTOM DEEP USERDATA API

CHANGE 147: BGe 16-Jun-21
   * changed lanes.threads() output so that several lanes with the same name don't clobber each other in the result table -> BREAKS API
   * bumped version to 3.15 because of the API change

CHANGE 146: BGe 26-Apr-19
   * lane:cancel() rework (see doc).
   * opt.cancelstep is gone, hook is installed by lane:cancel() if requested

CHANGE 145: BGe 28-Nov-18
   * more code refacto
   * don't test __lanesignore for POD types (-> slightly faster when trasnfering lots of data)

CHANGE 144: BGe 28-Nov-18
   * some code refacto

CHANGE 143: BGe 27-Nov-18
   * Lua 5.4 support
   * __lanesclone and  lanes.nameof support userdata uservalue(s)

CHANGE 142: BGe 26-Nov-18
   * Version is available in public header

CHANGE 141: BGe 25-Nov-18
   * protect_allocator configure option is gone, long live allocator (more embedders-friendly)

CHANGE 140: BGe 22-Nov-18
   * Raise an error instead of crashing when attempting to transfer a non-deep full userdata

CHANGE 139: BGe 21-Nov-18
   * more DEBUGSPEW

CHANGE 138: BGe 19-Nov-18
   * Registry access code utility macros
   * CONFIG_REGKEY and LOOKUP_REGKEY are now lightuserdata instead of strings
   * Stack checking debug macros improvements

CHANGE 137: BGe 15-Nov-18
   * Deep userdata must embed DeepPrelude to save an allocation (also changes Deep protocol)

CHANGE 136: BGe 15-Nov-18
   * split linda code in a separate file
   * rockspec for version v3.13.0

CHANGE 135: BGe 11-Nov-18
   * fix a bunch of compilation warnings

CHANGE 134: BGe 3-Dec-13
   * new API lanes.set_thread_affinity()
   * set_debug_threadname implemented with win32 pthread

CHANGE 133: BGe 8-Nov-18
   * Make sure any linda operation that can raise an error won't ever leave a mutex unreleased
   * lane:join() now returns nil, "timeout" in case of timeout

CHANGE 132: BGe 7-Nov-18
   * __lanesclone mechanism should actually work now

CHANGE 131: BGe 7-Nov-18
   * Fix potential crash at application shutdown when deep userdata were created before Lanes is required

CHANGE 130: BGe 2-Nov-18
   * always duplicate the config structure in new lanes even when no libraries are initialized by the generator
     (fixes an internal error trying to call on_state_create in a lane without any libs loaded)

CHANGE 129: BGe 2-Nov-18
   * Bumped version to 3.13
   * fix error when autodetecting protect_allocator when running under LuaJIT

CHANGE 128: BGe 31-Oct-18
   * Better default value autodetection for protect_allocator setting

CHANGE 127: BGe 30-Oct-18
   * restrict internal light userdata constants to 47 significant bits when building against LuaJIT-x64

CHANGE 126: Bge 29-Oct-18
   * Add deep user data cloning support

CHANGE 125: BGe 25-Oct-18
   * Fix Lanes build by reorganizing types around a bit

CHANGE 124: BGe 9-Jul-18
   * Fix a stack overflow when copying large tables with verbose_errors option enabled
   * Support for integer formatting in verbose errors

CHANGE 123: BGe 2-Aug-17
   * added support for user-provided __gc in deep userdata
   * more complete deep userdata sample

CHANGE 122: BGe 1-Aug-17
   * fix crash trying to use a deep-aware module while not requiring Lanes
   * bumped version to 3.12

CHANGE 121: BGe 13-Jun-17
   * no longer internally assert when an error message is not a string

CHANGE 120: BGe 5-Jun-17
   * new API function lanes.register( "name", module) to manually register a module table after it was required
   * Transfering registered module tables will link the equivalent in the destination state instead of cloning it
   * bumped version to 3.11

CHANGE 119: BGe 10-May-17
   * Fixed some compilation warnings
   * Improved LuaJIT support

CHANGE 118: trukanduk 21-Nov-16
   * bumped version to 3.10.1
   * objects with a metatable that contains __lanesignore are skipped during data transfers

CHANGE 117: mpeterv 21-Nov-16
   * Fix an implicit number-to-string conversion

CHANGE 116: BGe, mpeterv 27-Apr-15
   * bumped version to 3.10.0
   * segfault fixed in LG_lane_new
   * Lua 5.3 support

CHANGE 115: BGe 18-Sep-14
   * bumped version to 3.9.7
   * new function lanes.sleep()

CHANGE 114: BGe 8-Jul-14
   * Postponed _G scan for function lookup database to after on_state_create invocation
   * Fixed a crash when USE_DEBUG_SPEW == 1

CHANGE 113: BGe 17-Jun-14
   * bumped version to 3.9.6
   * separate deep userdata code in a dedicated file to allow external modules to implement Lanes-compatible deep userdata without requiring a binary dependency against the Lanes module
     because of this linda_id function(eDO_metatable) must push 2 values on the stack: a metatable and a deep version string obtained from luaG_pushdeepversion()

CHANGE 112 BGe 16-May-14
   * bumped version to 3.9.5
   * fix linda.__towatch to return non-nil when the linda is empty
   * lanes.gen() error reporting improvements

CHANGE 111 BGe 24-Apr-14
   * fixed linda:send() possibly returning an undefined value

CHANGE 110 Stepets 20-Apr-14
   * fix LuaJIT detection issues

CHANGE 109 BGe 03-Apr-14
   * moved some Lua-version compatibility code in separate source files

CHANGE 108: BGe 20-Mar-14
   * bumped version to 3.9.4
   * set_finalizer throws an error if provided finalizer isn't a function
   * fix error handling when the error doesn't generate an error handler call (IOW, all errors but LUA_ERRRUN)
   * provide callstack if LUA_ERRRUN occurs inside a finalizer

CHANGE 107: BGe 19-Mar-14
   * Make sure we don't mutex-wrap require() more than once, just in case

CHANGE 106: BGe 17-Mar-14
   * Fixed crash when using protect_allocator option

CHANGE 105: BGe 27-Feb-14
   * Bumped version to 3.9.3
   * new exposed variable linda.null that exposes the internal NIL_SENTINEL marker
   * linda:send() interprets send key linda.null as authorization to silently send a single nil when not provided with anything to send
     (useful when sending results of a function that can return nothing)

CHANGE 104: BGe 25-Feb-14
   * Bumped version to 3.9.2
   * Internal rework: the whole Lanes engine now works "per universe" to allow concurrent Lanes execution in more than one embedded master state
   * this universe is a full userdata created in the master state, selfdestruct_gc is the __gc for this userdata
   * most of what was initialized only once is now per-universe
   * Fixed potential crashes at desinit if problems occur during keeper states initialisation
   * Fixed require() not always serialized properly
   * Raise an error instead of crashing on deep userdata prelude memory allocation failure
   * Added forgotten mutex desinitialisation at universe shutdown

CHANGE 103: BGe 24-Feb-14
   * Fix lookup database table not being created when it should if Lanes is required in more than one Lua master state

CHANGE 102: BGe 18-Feb-14
   * raise an error instead of dereferencing a NULL pointer on deep userdata creation and lane struct creation

CHANGE 101: BGe 18-Feb-14
   * version 3.9.1
   * removed some keeper desinit legacy dead code
   * keeper array is allocated with master state's alloc function instead of malloc()/free()
   * prevent application crash when specifying a very large number of keepers in the configuration options
   * any error occuring during one-time inits is raised outside the one-time mutex protected code region

CHANGE 100: BGe 17-Feb-14
   * lanes.linda() accepts an optional integer group to give control on keeper state repartition

CHANGE 99: BGe 17-Feb-14
   * version 3.9.0
   * keepers now require "package", receive package.path & package.cpath, and call on_state_create() if it is a C function
   * changed the deep public API (improved deep idfunc signature, renamed luaG_deep_userdata to luaG_newdeepuserdata)
   * if an error occurs while copying a deep userdata, don't raise inside the keeper state
   * fixed situations where raised errors could lead to memory leaks (deep gc)

CHANGE 98: BGe 13-Feb-14
   * version 3.8.5
   * linda:limit() returns lanes.cancel_error on a limited linda
   * lanes.genlock() and lanes.genatomic() support cancelled lindas by returning lanes.cancel_error whenever appropriate
   * fixed a possible Lua stack overflow when calling linda:dump()
   * fixed cases where linda:send() and linda:receive() would not return lanes.cancel_error when they should

CHANGE 97: BGe 10-Feb-14
   * version 3.8.4
   * new API linda:cancel("read"|"write"|"both"|"none")
   * all linda operations return lanes.cancel_error on a cancelled linda
   * raised an internal string length so that longer linda names are fully output before truncation applies when doing tostring( linda)

CHANGE 96: BGe 24-Jan-14
   * another Lua stack overflow fix when sending complex function through lindas or as lane body

CHANGE 95: BGe 22-Jan-14
   * version 3.8.3
   * fixed a possible Lua stack overflow when sending complex function through lindas or as lane body
   * experimental: lanes.nameof() scans the registry if a regular search didn't yield anything interesting
   * fixed lanes.nameof() misbehaving when encountering a LUA_TTHREAD object

CHANGE 94: BGe 22-Jan-14
   * version 3.8.2
   * new lane launcher option gc_cb to set a callback that is invoked when a lane is garbage collected
   * Fix more invalid memory accesses when fetching the name of a joined lane with lanes:threads() (because its lua_State is closed)

CHANGE 93: BGe 20-Jan-14
   * slightly improve linda performance when the producer/consumer scenario leaves leave the key empty

CHANGE 92: BGe 20-Jan-14
   * version 3.8.1
   * new function lane:get_debug_threadname()
   * Fix invalid memory accesses when fetching the name of a joined lane with lanes:threads() (because its lua_State is closed)
   * use luaL_newmetatable() to create the metatable for lane objects
   * prevent malicious code from crashing by calling lane methods without passing the lane as first argument (raise an error instead)
   * set_debug_threadname() is no longer registered in the function lookup databases because it holds a C pointer as upvalue and it might crash if used maliciously

CHANGE 91: BGe 20-Jan-14
   * version 3.8.0
   * linda:set() accepts multiple values to set in the specified slot
   * linda:get() accepts an optional count to peek several values at once

CHANGE 90: BGe 16-Jan-14
   * version 3.7.8
   * lane:cancel() now accepts a boolean second argument when soft cancelling (negative timeout) to wake the thread if necessary
   * if a blocked linda send() or receive() call is interrupted by a cancellation request,
     it returns CANCEL_ERROR so that this case can be differentiated from a simple timeout
   * fixed WIN32 THREAD_CREATE() wrong _beginthreadex() error detection
   * fatal WIN32 threading errors retrieve and output the error description string with FormatMessage()
   * fixed missing lanes.set_singlethreaded
   * fixed perftest.lua
   * added test/cancel.lua

CHANGE 89: BGe 09-Jan-14
   * version 3.7.7
   * fix crash when calling linda:count() on unknown keys
   * purge key storage with linda:set( key, nil) on an unlimited key to reduce memory usage with lots of keys
   * linda:limit() wakes write-blocked threads if necessary when the new limit enables writes to occur again
   * linda:set() wakes write-blocked threads if necessary if the operation created some room to write into

CHANGE 88: BGe 06-Jan-14
   * version 3.7.6
   * if config.on_state_create() is a C function, call it by direct C closure reconstruction in newly created states

CHANGE 87: BGe 20-Dec-13
   * version 3.7.5
   * fixed a crash that can occur at shutdown when an object stored inside a keeper state performs a linda operation on a linda making use of another keeper
   * new setting demote_full_userdata to select between light userdata demotion or raising an error when attempting to transfer a non-deep full userdata

CHANGE 86: BGe 3-Dec-13
   * version 3.7.4
   * internal refactoring of pthread priority management code
   * new API lanes.set_thread_priority()

CHANGE 85: BGe 28-Nov-13
   * version 3.7.3
   * set pthread thread cancel type to PTHREAD_CANCEL_ASYNCHRONOUS
   * lane_h:cancel() accepts a 3rd timeout argument used when waiting for actual thread termination (hitting the timeout raises an error)
   * added PROPAGATE_ALLOCF macro to select state creation mode (lua_newstate or luaL_newstate)

CHANGE 84: BGe 18-Nov-13
   * Fix a deadlock when GCing during a linda operation.
   * Fix a compilation warning about an unused variable
   * Get rid of uintptr_t to remove dependency on stdint.h
   * Fix internal error at lane creation when the generator doesn't open any base library

CHANGE 83: BGe 16-Nov-13
   * version 3.7.2
   * Fixed function returned by lanes.genlock() not handling numeric keys properly when release lock
   * Enable lanes.genlock() to attempt lock with an optional "try" mode
   * make EnableCrashingOnCrashes a one-time operation

CHANGE 82: BGe 13-Nov-13
   * Fix a case where an error could be raised inside a keeper state

CHANGE 81: BGe 07-Nov-13
   * Make set_finalizer(), set_debug_threadname(), cancel_test() and set_error_reporting() transferable from lane to lane
   * Improved some DEBUGSPEW output

CHANGE 80: BGe 06-Nov-13
   * Fix a few compilation warnings about uninitialized variables
   * Fixed a bad extern variable declaration resulting in multiple instances (crashes the Pelles-C build)

CHANGE 79: BGe 04-Nov-13
   * Fix lanes.nameof() crashing when encountering a light userdata

CHANGE 78: BGe 25-Oct-13
   * Fix windows build not exporting public 'deep' API
   * Don't call on_state_create in keeper states, as it is no longer necessary
   * Remove inclusion of stdint.h
   * Fix windows build for WINVER > 0x400

CHANGE 77: BGe 22-Oct-13
   * version 3.7.1
   * errors inside finalizers generate a full stack just like any other error

CHANGE 76: BGe 10-Oct-13
   * version 3.7.0
   * fix lanes.threads() not being available in a lane where lanes.configure() settings didn't contain track_lanes although the initial configure() call did.

CHANGE 75: BGe 7-Oct-13
   * require "lanes".configure() sequence is only necessary at the first require "lanes".

CHANGE 74: BGe 7-Oct-13
   * fix a crash at application shutdown where in some situations we could deinitialize the protected allocator mutex while a lane was still using it.

CHANGE 73: BGe 4-Oct-13
   * fix timers broken by change 69

CHANGE 72: BGe 3-Oct-13
   * bugfix: no longer create a global named "lanes.core" inside lanes having "*" as library list

CHANGE 71: BGe 30-Sept-13
   * version 3.6.6
   * properly handle cases when a Lua C module is a C function

CHANGE 70: BGe 27-Step-13
   * no longer call core.configure with dummy params when requiring lanes more than once (fixes potential multithreading issues with LuaJIT allocator)
   * activated EnableCrashingOnCrashes() is active on Win32 debug builds
   * fixed some comments in code

CHANGE 69: BGe 26-Sept-13
   * version 3.6.5
   * Reduce memory footprint, simplify module order setup in conjuction with Lanes, and send over native functions a bit faster as well
   * Lanes no longer has to internally require modules inside the keeper states because they no longer need a lookup database
     the lookup name is stored as-is and actually converted in the destination state
   * optimisation: bypass cache when sending native functions over
   * removed all the KEEPER_MODEL_LUA code, as it can no longer work anyway

CHANGE 68: BGe 24-Sept-13
   * version 3.6.4
   * Fix possible application hang at shutdown if a keeper state referenced a linda.

CHANGE 67: BGe 2-Aug-13
   * version 3.6.3
   * lane:cancel(<negative-timeout>) only causes cancel_test() to return true but won't interrupt execution of the lane during linda operations

CHANGE 66: BGe 31-Jul-13
   * more explicit errors when trying to transfer unknown source functions (with new configure option verbose_errors)

CHANGE 65: BGe 23-Jul-13
   * default options wrap allocator around a mutex when run by LuaJIT

CHANGE 64: BGe 20-Jul-13
   * WIN32 builds against pre-Vista versions no longer use PulseEvent to fix occasional hangs when a wake event is missed

CHANGE 63: BGe 20-May-13
   * version 3.6.2
   * WIN32 builds use condition variables instead of PulseEvent() when available.
   * first steps toward fixing make-vc.cmd

CHANGE 62: BGe 05-Apr-13
   * version 3.6.1
   * function lookup database population keeps the 'smaller' name in case of multiple hits, to remove the no-LUA_COMPAT_ALL restriction on Lua5.2 builds

CHANGE 61: BGe 14-Mar-13
   * version 3.6.0
   * protect_allocator is an API change -> version bump
   * bugfix: allocator protection should be done once per primary Lua state, not once only the first time ever Lanes is required

CHANGE 60: BGe 13-Mar-13
   * version 3.5.2
   * stricter validation of with_timers config option: validator was accepting any non-boolean value
   * new configuration option protect_allocator for VMs with thread unsafe allocators (such as LuaJIT)
   * removed some obsolete bits of dead code

CHANGE 59: BGe 12-Feb-13
   * version 3.5.1
   * new lanes.h header and API call luaopen_lanes_embedded() for embedders
   * "lanes.core" is an acceptable library in the generator libs argument
   * library "*" wildcard also opens lanes.core
   * tweaked code for Xbox 360 build

CHANGE 58: BGe 30-Jan-13
   * version 3.5.0
   * new: API lanes.require(), use it instead of regular require() for modules that export C functions you need to send over.
   * new: lanes no longer require 'lanes.core' by default in every created state. Use {required={"lanes.core"}} if you need to transfer lanes functions.
   * internal: because of the above, reworked the timer implementation to remove upvalue-dependency on lanes.core
   * new: API lanes.timer_lane, to be able to operate on timer lane if need be
   * improved: if a module is a full userdata, scan its metatable for function database population
   * improved: on_state_create can be a Lua function
   * changed: on_state_create is called after the base libraries are loaded
   * package[loaders|searchers] is no longer transfered as function naming depends on slot order
   * internal: changed separator from '.' to '/' in lookup databases to be able to distinguish search levels and dot coming from module names
   * added some mode debug spew
   * updated tests to reflect the above changes

CHANGE 57: BGe 28-Jan-13
   * More detailed DEBUG_SPEW logs
   * A bit of code cosmetics

CHANGE 56: BGe 25-Jan-13
   * version 3.4.4
   * bugfix: take into account the fact that "coroutine" is no longer part of base library in Lua 5.2
   * bugfix: if "bit32" was listed in the libraries, it wouldn't open (library list parsing failing on digits)
   * bugfix: Use luaL_requiref() to open standard libraries in Lua 5.2 as we should
   * bugfix: any Lua state created by Lanes reuses the allocator function of the originating state
   * bugfix: don't call on_state_create() while GC is suspended during lua state initialization

CHANGE 55: BGe 24-Jan-13
   * version 3.4.3
   * raise an error if lane generator libs specification contains a lib more than once
   * bit32 is a valid lib name in the libs specification (silently ignored by the Lua 5.1 build)
   * improved lanes.nameof to search inside table- and userdata- metatables for an object's name
   * bugfix: fixed an unwarranted error when trying to discover a function name upon a failed transfer
   * contents of package.[path,cpath,preload,loaders|searchers] are pulled *only once* inside keeper states at initialisation
   * Lua function upvalues equal to the global environment aren't copied by value, but bound to the destination's global environment
     especially useful for Lua 5.2 _ENV
   * bugfix: fixed loading of base libraries that didn't create the global tables when built for Lua 5.2

CHANGE 54: BGe 10-Jan-13
   * version 3.4.2
   * Don't pull "package" settings in the timer lane
   * removed a limitation preventing Lua functions with indirect recursive upvalue references from being transferable

CHANGE 53: BGe 11-Dec-2012
   * version 3.4.1
   * new function lanes.timers(), returns a list of all active timers.

CHANGE 52: BGe 03-Dec-2012
   * linda:send() and linda:receive() no longer triggers string->number autocoercion when checking for the optional timeout argument:
      a string is always a linda slot, even if coercible.

CHANGE 51: BGe 27-Nov-2012
   * linux flavors with older glibc use prctl instead of pthread_setname_np
   * selfdestruct chain handling is now the same on all platforms

CHANGE 50: BGe 22-Nov-2012
   * bugfix: linda:set() no longer clears the storage limit

CHANGE 49: BGe 21-Nov-2012
   * fix application shutdown crash by not registering anything with atexit()
   * rockspec for version v3.4.0

CHANGE 48: BGe 25-Sep-2012
   * version 3.4.0
   * new method linda:dump() that outputs the full contents of a linda as a table, also linked to __towatch for Decoda support
   * linda:receive() API change!
   * instead of [val, key], linda:receive( timeout, key) returns [key, val]
   * instead of [val, [...]], linda:receive( timeout, linda.batched key) returns [key, val[, ...]]
     this is to unify the return values of regular and batched mode, and to be able to tell when batched mode is interrupted by a lane cancellation
   * fixed Lua 5.2 build to take into account the "loaders"->"searchers" name change in 'package' module.
   * a bit of html cleanup and added some infos in the documentation regarding the Lanes internals

CHANGE 47: BGe 13-Sep-2012
   * implemented set_debug_threadname() for pthread builds where possible
   * refactored linda __tostring and __concat

CHANGE 46: BGe 10-Sep-2012
   * version 3.3.0
   * lane.status can return "killed" if lane was forcefully killed with lanes:cancel()
   * lane:join(): return nil, "killed" if called on a killed lane.
   * lane[<n>]: produces [1] = nil, [2] = "killed" if the lane was killed
   * lane:join(): fixed an assertion in debug builds when joining a lane forcefully cancelled with lane:cancel( <x>, true).
   * indexing a lane with a string other than "join", "cancel" or "status" raises an error.
   * fixed configure() to correctly apply defaults when they are missing from the provided settings
   * added a shutdown_timeout to control the duration Lanes will wait for graceful termination of running lanes at application shutdown. Default is 0.25.

CHANGE 45: BGe 21-Aug-2012
   * keeper internals implemented in C instead of Lua for better performances
   * fixed arguments checks in linda:limit() and linda:set()

CHANGE 44: BGe 13-Aug-2012
   * lanes code updated to build against Lua 5.1 and Lua 5.2
   * removed the search for MSVCR80.DLL when building for MinGW32 since it no longer seems to be necessary

CHANGE 43: BGe 09-Aug-2012
   * fix possible crash at application shutdown when a race condition causes linda objects to be collected after the keeper states are cleaned up.

CHANGE 42: BGe 06-Aug-2012
   * lanes.linda() accepts an optional name for debug purposes

CHANGE 41: BGe 07-Jul-2012
   * lua51-lanes renamed lanes/core
   * keeper state microcode is no longer embedded inside lanes.core, but located and loaded with package.loaders[2]
   * changed rockspec build type from "make" to "builtin"

CHANGE 40: BGe 26-Jun-2012
   * when a transfered function is not found in source, guess its name to help the user find out what's wrong
   * new function lanes.nameof()

CHANGE 39: BGe 23-Jun-2012
   * lanes.timer() accepts a first_secs=nil to stop a timer
   * timer lane catches errors and prints them
   * fixed some typos in manual

CHANGE 38: BGe 11-Jun-2012
   * linda:receive() batched mode now accepts a max_count optional argument

CHANGE 37: BGe 4-Jun-2012 (fix and idea courtesy of sonoro1234)
   * fixed thread_cancel() not working when called without argument
   * new lane-global function set_error_reporting() to enable more data detailed data provided by lane_error()

CHANGE 36 BGe 26-Apr-2012
   * improved LuaJIT2 compatibility by handling "*" library set through luaL_openlibs()

CHANGE 35 BGe 17-Feb-2012
   * changed lanes.configure signature to receive a table instead of individual parameters
   * added support for an on_state_create callback called to load custom functions in a state in addition to the base libraries

CHANGE 34 BGe 14-Nov-2011
   * removed packagepath and packagecpath options, replaced by a package table, whose fields path, cpath, loaders, preload are transfered
   * code cleanup to facilitate transition between WIN32 and PTHREAD implementations
   * tentative fix for desinit crashes when free running lanes are killed at process shutdown

CHANGE 33 BGe 5-Nov-2011: Lanes version 3.0-beta
   * process exit change: close everything at GC when main state closes, not when atexit() handlers are processed
   * Lua 5.2-style module:
      * module() is no longer used to implement lanes.lua
      * a global "lanes" variable is no longer created when the module is required
      * the Lanes module table is returned instead
   * Lanes must be initialized before used:
      * the first occurence of 'require "lanes"' produces a minimal interface that only contains a configure() function
      * the remainder of the interface is made available once this function is called
      * subsequent calls to configure() do nothing
      * configure() controls the number of keeper states and the startup of timers
   * LuaJIT 2 compatibility
      * non-Lua functions are no longer copied by creating a C closure from a C pointer, but through 2-way lookup tables
      * this means that if a lane function body pulls non-Lua functions, the lane generator description must contain the list of libraries and modules that exports them
      * introduces a change in configuration .globals management: contents are copied *after* std libs are loaded
      * new .required configuration entry to list modules that must be require()'ed before lane body is transferred
   * lane:cancel() wakes up waiting lindas like what is done at lane shutdown

CHANGE 32 BGe 14-May-2011
   * raise an error when linda:send() has nothing to send

CHANGE 31 BGe 17-Apr-2011
   * linda uses a fast FIFO implementation to speed up data exchanges
   * new linda:count() method
   * new linda batched data read mode
   * proper key type check in all linda methods
   * fix setup-vc.cmd to support Visual Studio 2010 and Windows 7 64 bits
   * bugfix: release keeper state mutex at desinit

CHANGE 30 BGe 30-Mar-2011
   * linda honors __tostring and __concat
   * new accessor linda:keys(), to retrieve the list of keys with pending data inside a linda
   * new lanes options packagepath and packagecpath, in case one needs to set them differently than the default

CHANGE 29 BGe 1-Mar-2011
    fixed potential crash at application shutdown when calling lua_close() on a killed thread's VM.
    exposed cancel_test() in the lanes to enable manual testing for cancellation requests.
    removed kludgy {globals={threadName}} support, replaced with a new function set_debug_threadname().

CHANGE 28 BGe 18-Feb-2011
    - moved keeper-related code in a separate source file
    - keeper.lua is now embedded in text form instead of bytecode to improve LuaJIT2-compatibility

CHANGE 27 BGe 17-Feb-2011
    - we know Lanes is loaded in the master state, so we don't force it
      to be required in every lane too when a linda deep userdata is copied
    - Refactor lane proxy implementation: it is now a full userdata instead
      of a table, and its methods are implemented in C instead of Lua
      * its metatable is no longer accessible
      * writing to the proxy raises an error
      * it is no longer possible to overwrite its join() and cancel() methods
    - when a deep userdata idfunc requests a module to be required, manually
      check that it is not loaded before requiring it instead of relying on
      the require function's loop detection feature
    - when a module must be required, raise an error if the 'require' function
      is not found in the target state

CHANGE 26 BGe 14-Feb-2011:
    Fixed application hang-up because keeper state was not released in case of errors thrown by
    inter-state data copy for unsupported types

CHANGE 25 BGe 12-Feb-2011:
    Changed idfunc signature and contract to clarify that fact it is not lua-callable
    and to be able to require the module it was exported from in the target lanes

CHANGE 24 DPtr 25-Jan-2011:
    Changed lanes.c to export functions as a module rather than writing them directly to the globals table.

CHANGE 23 DPtr 23-Jan-2011:
    Fixed bug where reference to Linda object was dropped for a short time ( crashing if GC was run during that time ).
    Changed the atexit code to trip the timer thread's write signal. 

CHANGE 22 DPtr 19-Jan-2011:
    Changed luaG_push_proxy to cache deep userdata proxies.

CHANGE 21 (bugfixes) BGe 3-Jan-2011:
    Several fixes by Martin Krpan:
    - linda_send was waiting on the wrong signal
    - buildfix when using i586-mingw32msvc-gcc cross compiler
    - lanes_h:cancel() returns a boolean as it should
    - timers could get blocked sometimes because they were initialized with negative values
    - prepare_timeout could generate an illegal setting

CHANGE 20 BGe 3-Dec-2010:
    Enable to specify a string as lane code instead of a function so that we dont use lua_dump, which
    isn't supported by LuaJIT.

CHANGE 19 BGe 2-Dec-2010:
    No longer rely on global function 'tostring' to generate unique identifiers when caching data being transfered through la linda. Should fix a compatilibity issue with LuaJIT2.

CHANGE 18 BGe 6-Oct-2010:
    Fixed 'memory leak' in some situations where a free running lane is collected before application shutdown
    A bit of code cleanup

CHANGE 17 BGe 21-Sept-2010:
    Fixed stupid compilation errors.

CHANGE 16 PLM 24-Aug-2010:
    Releasing memory at gc / atexit.
    Finalizers actually get error strings.
    Fixed missing argument propagation in lane:cancel
    Added variable threadName sent trough globals-table. Set in s_lane, and in debuggers on windows.
    Added argument checking for linda-objects, where missing them caused crashes.

CHANGE 15 (minor) BGe 27-Jul-2010:
    Version bump for a true upgrade release (2.0.4 package was only a renamed 2.0.3)

CHANGE 14 (bug fix) BGe 09-Jul-2010:
    Fixed lane status to be correctly returned as "waiting" when it should.

CHANGE 13 (fix for multithreaded host apps) AKa 24-Jun-2009:
    <borisusun-at-gmail> mentioned Lanes expects the host application to be singlethreaded,
    and there are troubles if Lanes is used from multiple threads, opened by the host
    (before requiring Lanes). This is true, and fix should now be in place.

CHANGE 12 (bug fix on Windows, 2.0.3) AKa 25-Jan-2009:
    Did CHANGE 9 the way it should be done.

CHANGE 11 (new feature, 2.0.3) AKa 23-Jan-2009:
    Finalizers ('set_finalizer()') for being able to do cleanup of a lane's
    resources, whether it returned succesfully or via an error.

CHANGE 10 (new feature, 2.0.3) AKa 23-Jan-2009:
    Call stack showing where an error occurred is not merged with the error
    message, but delivered as a separate stack table ({ "filename:line" [, ...] }).
    Getting call stacks of errorred lanes is now possible.

CHANGE 9 (bug fix on Windows) AKa 10-Dec-2008 (> 2.0.2):
    Applied patch from Kriss Daniels to avoid issues on 'now_time()' in Win32
    (http://luaforge.net/forum/forum.php?thread_id=22704&forum_id=1781).

CHANGE 8 (bug fix) AKa 26-Oct-2008:
    Avoids occasional segfault at process exit (on multicore CPUs). Does this
    by keeping track of "free running" threads (s.a. the time thread) and
    cancelling them at process exit.

    Tested (2.0.2) on Linux 64,x86, OS X, WinXP.

CHANGE 7 (bug fix) AKa 15-Oct-2008:
    Recursive functions that use themselves as direct upvalue can now be
    passed to other lanes, and used as a lane function.

CHANGE 6 (bug fix) AKa 15-Oct-2008:
    Added local caches of the following to src/lanes.lua (was otherwise getting
    errors at least in 'tests/irayo_recursive.lua').

        local assert= assert
        local string_gmatch= assert( string.gmatch )
        local select= assert( select )
        local type= assert( type )
        local pairs= assert( pairs )
        local tostring= assert( tostring )
        local error= assert( error )
        local setmetatable= assert( setmetatable )
        local rawget= assert( rawget )

    Thanks to Irayo for detecting and reporting this.

CHANGE 5 (new feature):
    Modifying Makefile so it's better suited to LuaRocks.

CHANGE 4 (new feature):
    Metatable copying, allowing Lua objects to be copied across lanes.

CHANGE 3 (bug fix) AKa 5-Aug-2008:
    The '__gc' method was not tied to thread userdata, at all. Caused memory
    lifespan problems at least on OS X when threads were cancelled (EINVAL).

CHANGE 2 (bug fix) AKa 5-Aug-2008:
    Better calculation of timeouts, always making them absolute (even in Win32)
    to allow for events that wake the lane up but don't read/write the Linda
    key that it was observing.

CHANGE 1 (bug fix) AKa 4-Aug-2008:
    Signalling woke up only one waiting thread, not all. This caused i.e.
    receive to not wake up if there was another thread waiting on the same
    Linda object.

    PThread fix: using 'pthread_cond_broadcast()' instead of 'pthread_cond_signal()'
    Win32 fix: using manual events and 'PulseEvent()'

(end)
