Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ucbvax!hplabs!well!ewhac From: ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) Newsgroups: comp.sys.amiga Subject: Re: To any Task/Port/Window Gurus (Help) Message-ID: <4943@well.UUCP> Date: 9 Jan 88 06:37:59 GMT References: <183@ra> Reply-To: ewhac@well.UUCP (Leo 'Bols Ewhac' Schwab) Organization: Hole Earth 'Lectronic Loss (or words to that effect) Lines: 26 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.... _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ Leo L. Schwab -- The Guy in The Cape ihnp4!ptsfa -\ \_ -_ Recumbent Bikes: dual ---> !{well,unicom}!ewhac O----^o The Only Way To Fly. hplabs / (pronounced "AE-wack") "Work FOR? I don't work FOR anybody! I'm just having fun." -- The Doctor