Re: [code] [textadept] freezes while running a script.

From: Mitchell <m.att.foicica.com>
Date: Sun, 19 Aug 2012 20:57:12 -0400 (EDT)

Hi,

On Sun, 19 Aug 2012, Jason wrote:

> Hi,
>
> I'm having trouble with Textadept freezing while executing a script.
> If I either run a long loop, or wait on things like sockets in the script,
> the entire Textadept UI will freeze.
>
> Since I'm trying to modernize the outdated Textadept debugger[1] to use a
> remote debugger this proves problematic, so I'd like to request that a
> feature
> be added that allows for `modules/textadept/run.lua` to run a command
> without
> having all of Textadept waiting for it to finish. It seems to me that
> this is a very
> common feature among editors/IDEs, so I hope Textadept will soon follow
> suit.

I worked on this some time ago using GTK's "spawn" facilities but it was
problematic on Windows so I decided against including it.

Obviously Textadept is a single-threaded application. Lua states accessed
from multiple threads can mis-behave and cause problems so I am reluctant
to support it.

> I have though about implementing this with LuaLanes to create a new
> thread, but this is
> probably far too bulky of a solution to make it into an actual Textadept
> release.
>
> So, thoughts about this?

I am open to patches and suggestions, but am unlikely to look into it
myself unless I have a good amount of time.

> [1] http://foicica.com/wiki/lua-debugger

When I get some time I need to really spend some time looking into fixing
the debugger for Lua 5.2. A quick analysis showed that functions cannot
yield from inside a debug hook (at least that is what I think I recall).
Perhaps there is another way without resorting to the client-server model.

Mitchell

-- 
You are subscribed to code.att.foicica.com.
To change subscription settings, send an e-mail to code+help.att.foicica.com.
To unsubscribe, send an e-mail to code+unsubscribe.att.foicica.com.
Received on Sun 19 Aug 2012 - 20:57:12 EDT

This archive was generated by hypermail 2.2.0 : Mon 20 Aug 2012 - 06:50:12 EDT