Number: 891

Date:  1-May-84 11':52':59

Submitter: Sannella.PA

Source: Burton.pa

Subject: PROMPTFORWORD locks when it shouldn''t

Lisp Version: 

Description: '
Date': 30 Apr 84 14':19 PDT'
From': Burton.pa'
Subject': Lisp': PROMPTFORWORD locks when it shouldn''t'
To': LispSupport.pa'
'
Lisp System Date': 26-Apr-84 11':50':17'
Machine': Dorado (Burton)'
Microcode version': 24,4'
Memory size': 10000'
Frequency': Always'
Impact': Annoying'
'
'
PROMPTFORWORD seems to request a lock something when it shouldn''t.  I had promptforword called in its own window and buttoned to start a TEDIT.  When I tried to Get a file into this tedit, it held under obtain.monitorlock under promptforword.  It might be trying to grab the promptwindow but both of these instances had their own windows.'
'
richard'
'
-----'
'
Date':  1 May 84 13':59 PDT'
From': JonL.pa'
Subject': Re': AR 891': PROMPTFORWORD locks when it shouldn''t'
In-reply-to': LispSupport.pa''s message of 1 May 84 11':53':17 PDT (Tuesday)'
To': Burton '
cc': LispSupport.pa, LispCore↑, '
'
PROMPTFORWORD locks the "usage" of PROMPTFORWORD, based on the facts that  (1) there aren''t generally available locks on windows, and (2) an implicit assumption that you want to complete one unscheduled transaction before starting another.  The first is rather important; the second is up for votes.'
'
If all the up-n-coming prompt windows (as well as the standard PROMPTWINDOW) could have a monitorlock in their plist, then PROMPTFORWORD would be better off locking that.'
'
Any other opinions?'
'
-----'
'
Date':  1 May 84 14':25 PDT'
From': vanMelle.pa'
Subject': Re': AR 891': PROMPTFORWORD locks when it shouldn''t'
In-reply-to': JonL.pa''s message of 1 May 84 13':59 PDT'
To': JonL.pa'
cc': Burton.pa, LispSupport.pa, LispCore↑.pa'
'
Actually, I would like to see a lot of assumptions removed from PROMPTFORWORD.  As things stand now, PROMPTFORWORD has the look of a "general-purpose" input function, and people try to use it that way, but it does things that other "general-purpose" input functions, such as READ, TTYIN, even ASKUSER, don''t.'
'
1. It interlocks itself in such a way that only one of it can run.'
'
2. It grabs the tty.'
'
3. It rings a bell if you don''t answer quickly (should be an option at best).'
'
Basically, I think it is the caller''s responsibility to interlock its use of a public window against anyone else.  Similarly, it is the caller''s responsibility to take the tty if it didn''t have it and it is sure it wants to preempt.  I had the absurd thing happen the other day that I started up MAINTAIN, started typing to another process while MAINTAIN was initializing, in the middle of which MAINTAIN grabbed my tty back because it gets its input using PROMPTFORWORD.'
'
	Bill'
'
-----'
'
Date': 11 May 84 01':34 PDT'
From': JonL.pa'
Subject': AR 891': PROMPTFORWORD locks when it shouldn''t'
To': Burton,vanMelle'
cc': JonL.pa,Sannella'
'
I edited this AR''s problem type from "bug" into "Design-UI"; my message of 1-May-84, and Bill''s reply, show that there is a serious question at the caller''s level of what locking, if any, is wanted.  '
'
I also upgraded the difficulty to "moderate", since I think a minimal solution would involve putting monitor locks on all promptwindows that are accessible from more than one process, and coordinating the usage of them in an "orderly" fashion.'
'
-- JonL --'
'
-----'
'
Date': 16 May 84 23':34 PDT'
From': JonL.pa'
Subject': Re': AR 891': PROMPTFORWORD locks when it shouldn''t'
In-reply-to': Burton.pa''s message of 16 May 84 16':58 PDT'
To': Burton.pa'
cc': JonL.pa, vanMelle.pa, Sannella.pa'
'
You''re right that something is buggy here, and I rather like your suggestion to split the AR into two parts':'
'
1) PROMPTFORWORD will not merely wait for the monitor lock, but given the current lacunae in the system, will print out an error message about the fact that another call to PROMPTFORWORD is pending and uncompleted (Print out where? the PROMPTWINDOW?)'
'
2) submit another AR on the desire to cleanup the the users of PROMPTFORWORD so that typically they supply a monitored window, and thus, typically, two calls can proceed in parallel.'
'
-- JonL --'
'
'


Workaround: 

Test Case: 

Edit-By: Sannella.PA

Edit-Date: 17-Aug-84 11':52':23

Attn: 

Assigned To: 

In/By: Harmony

Disposition: PROMPTFORWORD will merely print an warning message in the PROMPTWINDOW if it cannot obtain it''s lock -- this interim solution follows my message of May 16 below.  JonL 8/2/84

System: Operating System

Subsystem: Processes

Machine: 

Disk: 

Microcode Version: 

Memory Size: 

File Server: 

Server Software Version: 

Difficulty: Moderate

Frequency: Everytime

Impact: Annoying

Priority: Perhaps

Status: Closed

Problem Type: Design - Impl

Source Files: