[Cuis-dev] Cuis web package

Andres Valloud ten at smallinteger.com
Wed Jun 12 17:35:11 PDT 2024


Suppose you do something like this.

	[Semaphore new wait] fork

What happens to the new process?

On 6/12/24 8:23 AM, Juan Vuletich via Cuis-dev wrote:
> Hi Mark,
> 
> In Worspaces, variables not declared between vertical vars are 
> "Workspace Variables" and live until the Workspace is closed.
> In methods, variables declared as temporaries, between vertical vars, 
> may be garbage collected anytime after the method exits, unless there is 
> some other reference to the contents.
> 
> So, yes. It is very possible that that's the difference.
> 
> Cheers,
> 
> On 6/12/2024 11:27 AM, Mark Volkmann via Cuis-dev wrote:
>> Is it possible the issue is that when I run the code from a Workspace, 
>> the server does not get garbage collected, but when I run it from 
>> within the `initialize` method, it does get garbage collected?
>>
>> On Tue, Jun 11, 2024 at 8:42 PM Mark Volkmann 
>> <r.mark.volkmann at gmail.com <mailto:r.mark.volkmann at gmail.com>> wrote:
>>
>>     I created a class named `MyWebServer` and added this `initialize`
>>     method.
>>
>>     initialize
>>         "demonstrates using the WebServer class"
>>
>>         server := WebServer new listenOn: 1961.
>>         server addService: '/' action: [ :req | req send200Response:
>>     'Home Page' ].
>>         server addService: '/hello' action: [ :req | req
>>     send200Response: 'Hello World!' ]
>>
>>     Then I entered this in a Workspace and ran "Do it":
>>
>>     MyWebServer new
>>
>>     This started a process named "WebServer's listener process" that I
>>     see in a Process Browser window.
>>
>>     If I browse localhost:1961, the browser just hangs. But if I enter
>>     that same code in a Workspace, both routes work fine.
>>     What am I missing?
>>
>>     On Tue, Jun 11, 2024 at 7:24 PM Mark Volkmann
>>     <r.mark.volkmann at gmail.com <mailto:r.mark.volkmann at gmail.com>> wrote:
>>
>>         Thank you so much! This is exactly what I was looking for.
>>
>>         On Tue, Jun 11, 2024 at 1:05 AM Bernhard Pieber via Cuis-dev
>>         <cuis-dev at lists.cuis.st <mailto:cuis-dev at lists.cuis.st>> wrote:
>>
>>             Feature require: 'WebClient'.
>>
>>             See class WebServer
>>
>>             Cheers,
>>             Bernhard
>>
>>
>>             > Am 10.06.2024 um 14:39 schrieb Mark Volkmann via
>>             Cuis-dev <cuis-dev at lists.cuis.st
>>             <mailto:cuis-dev at lists.cuis.st>>:
>>             >
>>             > Can someone recommend a package I should look at to
>>             learn about implementing HTTP endpoints in Cuis?
>>             >
>>             > ---
>>             > R. Mark Volkmann
>>             > Object Computing, Inc.
>>             > --
>>             > Cuis-dev mailing list
>>             > Cuis-dev at lists.cuis.st <mailto:Cuis-dev at lists.cuis.st>
>>             > https://lists.cuis.st/mailman/listinfo/cuis-dev
>>             <https://lists.cuis.st/mailman/listinfo/cuis-dev>
>>
>>
>>             -- 
>>             Cuis-dev mailing list
>>             Cuis-dev at lists.cuis.st <mailto:Cuis-dev at lists.cuis.st>
>>             https://lists.cuis.st/mailman/listinfo/cuis-dev
>>             <https://lists.cuis.st/mailman/listinfo/cuis-dev>
>>
>>
>>
>>         -- 
>>         R. Mark Volkmann
>>         Object Computing, Inc.
>>
>>
>>
>>     -- 
>>     R. Mark Volkmann
>>     Object Computing, Inc.
>>
>>
>>
>> -- 
>> R. Mark Volkmann
>> Object Computing, Inc.
> 
> 
> -- 
> Juan Vuletich
> cuis.st
> github.com/jvuletich
> researchgate.net/profile/Juan-Vuletich
> independent.academia.edu/JuanVuletich
> patents.justia.com/inventor/juan-manuel-vuletich
> linkedin.com/in/juan-vuletich-75611b3
> twitter.com/JuanVuletich
> 
> 


More information about the Cuis-dev mailing list