Re: Single instance module and multithreading

From: helgoboss <>
Date: Sun, 22 Feb 2009 03:13:52 -0800 (PST)

Hello Vyacheslav,

the problem with LuaLanes is that the threads don't share global data.
I see no way how to control Textadept from a second thread if it can't
access the "textadept" table. LuaLanes uses copying to share data
between threads, but copying the "textadept" table makes no sense.
I've also looked into LuaThread which seems to be the only threading
approach that allows sharing of global data, but it needs a modified
lua.dll and I couldn't get it to work in Lua 5.1.


On 22 Feb., 06:47, Vyacheslav Egorov <> wrote:
> Hi,
> Maybe it is better to use some 3rd party library instead of (re)implementing
> threading support from scratch?
> LuaLanes <> looks quite interesting: it
> supports three major platforms and utilizes message-passing abstraction,
> which in many cases makes multithreaded development easier.
> I think that threading support of some sort is absolute must for TA, because
> it seems impossible to implement REPL or debugger without it.
> --
> e.v.e
> On Sun, Feb 22, 2009 at 8:10 AM, mitchell <> wrote:
> > Benjamin,
> > >Question to
> > >Mitchell: Do you plan to add multithreading support in future?
> > I do not, simply because I haven't the slightest clue how to. I know
> > Lua doesn't use multi-threading because it is not cross-platform and
> > does not always behave as expected. I'm inclined to believe the same.
> > > It is up to Mitchell though to decide if this is
> > > going to make it into textadept, cause I would not even know where to
> > > start :) I hope he does!
> > If I did I would have no problems adding this. Unfortunately I do not
> > know at this time.
> > Earlier I was thinking it could be done through WinAPI's SendMessageA,
> > but I don't know how. (MSDN is a monster and I am no Windows
> > programmer.) Ideally we would use LuaSocket, but the blocking is a
> > problem and I know of no way around it.
Received on Sun 22 Feb 2009 - 06:13:52 EST

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:37:29 EST