[slime-devel] Threads attributes

Terje Norderhaug terje at in-progress.com
Tue Jun 23 20:07:24 UTC 2009


On Jun 23, 2009, at 12:19 PM, Terje Norderhaug wrote:
> On Jun 23, 2009, at 11:29 AM, Tobias C. Rittweiler wrote:
>> Terje Norderhaug <terje at in-progress.com> writes:
>>> On Jun 22, 2009, at 11:18 PM, Tobias C. Rittweiler wrote:
>>>> Terje Norderhaug <terje at in-progress.com> writes:
>>>>
>>>>> The  slimefun swank:list-threads currently provides only four
>>>>> values
>>>>> for each thread, namely id, name, status and description.
>>>>>
>>>>> However, it would be useful to have a generalized interface to
>>>>> other
>>>>> information about threads, such as their priority, creation time,
>>>>> idle time, and total run time.
>>>>
>>>> The idea is to compute a description string which contains such
>>>> data.
>>>
>>> A swank client (like slime) will have a hard time extracting thread
>>> data from such a human readable description string.
>>
>> The description could be a plist instead of a string. How about that?
>
> A plist with additional thread data would serve the purpose, just as
> long as the format is consistent between the implementations.

Another possibility is to have the list-threads response include a  
declaration of the structure of the items in the list. For example,  
the first item could be a list of symbols labeling the data, as in  
this amended response from swank:list-threads:

((id name status description)
(18 "worker" "Active" "")
(16 "repl-thread" "Semaphore timed wait" "")
(15 "auto-flush-thread" "Sleep" "")
(12 "reader-thread" "Active" "")
(11 "control-thread" "Semaphore timed wait" "")
(2 "Swank 0" "Active" "")
(1 "listener" "Active" "")
(0 "Initial" "Sleep" ""))

Benefits of heading with such a declaration vs using a detailed  
property list for each item includes less redundancy and that a swank  
client can make decisions about how to present the items in the list  
before processing the rest of the response.

Implementations can then add process attributes like priority,  
creation-time, total-run-time, last-run-time, idle-time etc,  
preferably using consistent labels.

-- Terje Norderhaug






More information about the slime-devel mailing list