Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!inuxc!iuvax!pur-ee!j.cc.purdue.edu!i.cc.purdue.edu!purdue!gatech!hao!noao!stsci!barsh From: barsh@stsci.EDU (John Barshinger) Newsgroups: comp.sys.amiga Subject: Re: To any Task/Port/Window Gurus (Help) Message-ID: <190@obi-wan> Date: 9 Jan 88 17:38:36 GMT References: <4943@well.UUCP> Organization: Space Telescope Science Institute, Baltimore, MD 21218 Lines: 70 in article <4943@well.UUCP>, ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) says: > > In article <183@ra> barsh@stsci.EDU (John Barshinger) writes: >>To a task/port GURU: >> > I'm not a Guru, but I play one on TV.... :-) > >>Is there any way to fake out the Amiga to set a signal bit in task2 >>so that I can just wait for it as if task2 had opened the window. >>I realize that I could just open the window in task2, but then I would >>need to create more ports (and use more memory, etc) just to send messages >>to terminate the program and synchronize closing the windows before closing >>the custom screen. (if I don't open/allocate anything in task2, when main >>terminates, Task2 will also go away without any adverse effects, right?? >> > This scenario as you describe it is not possible (task 2 allocates > nothing, therefore frees nothing when RemTask()ed). In order for Intuition > to Signal() you, you *must* allocate a signal bit (AllocSignal()). > Consequently, you must free it before your task exits. > > Since you're doomed to allocating at least the signal, you may as > well open the whole window... According to Rob Peck's book, Programmers Guide to the Amiga, task2 can AllocSignal and not have to FreeSignal since the task will be removed and task's signals are in each task, he says, why bother, seems reasonable to me... The above book has been very useful in my efforts in this, I have all of the RKM books, but sometimes they aren't very complete on descriptions. I also ordered and got his disk with all the book examples on it, this is also very useful, There are even some extra things on the disk that are kinda neat, but I have found that some examples in the book didn't make it to disk :-(. But I highly recommend the book, even if you have all ROM Kernal Manuals... Anyway, back to the main topic, Since we were all snowed in and got Friday off here in Baltimore. I was able to spend the whole day visiting the guru and finding the answers to the questions in my first posting. I'm modifying my version of VT100 to use Leo's iconify, but I want the iconify gadget to work even when I'm downloading so that I can leave my screen and go on to do other stuff. Then d-click the VT100 icon and check its progress, etc. So after modifying iconify, so that is runs as a separate task that waits for the iconify gadget to be clicked, then removes the VT100 screen from the display, then does its thing (makes the VT100 gadget on the WBENCH screen, and waits for the d-click ), then it returns VT100 to the screen, etc. This is a more useful way for iconify to work for me in this application, what do you think? jrbii ~~~~~ p.s. I will probably send this to moderators in the next few days, it will also be available on PeopleLink... -- John Barshinger Space Telescope Science Institute Baltimore, MD 21218 plink:jrbii | bix:jrbii | barsh@stsci.edu