So, changing the procedure Update_User_Views to an entry just requires to
change two lines:

In the protected Users spec:

      entry Update_User_Views (X1, Y1, X2, Y2 : in Integer);

and in the corresponding body:

      entry Update_User_Views (X1, Y1, X2, Y2 : in Integer) when not
U.Is_Empty is

I think that's it from me now.... ;-) Apologies for multiple emails.

Cheers,
David


Il giorno dom 22 apr 2018 alle ore 20:11 David Trudgett <
[email protected]> ha scritto:

> One other thing: the text in the User Guide would then have to be updated
> accordingly, since it talks about leaving these changes as an exercise for
> the reader.
>
> Regards,
> David
>
>
> Il giorno dom 22 apr 2018 alle ore 20:08 David Trudgett <
> [email protected]> ha scritto:
>
>> Hi Pascal,
>>
>> I'm happy for you to use it in any way you see fit. No problem.
>>
>> Just a couple of points which come to mind about it, now that I give it
>> some thought:
>>
>> 1. The diff is against two versions of my own source code repository,
>> which doesn't correspond to anything in the Gnoga repository, so you would
>> have to apply the diff manually. (I don't think the example application in
>> the Gnoga repo comes with separate source files apart from the text in the
>> user guide... at least as far as I know.) I might possibly be able to
>> prepare a diff against the user guide markdown file, if that helps, but I
>> would have to do that manually, too. Alternatively, I could just bundle up
>> all my source files for that example and give them to you for inclusion in
>> the demos directory, perhaps?
>>
>> 2. From the protected procedure "Update_User_Views" I call
>> "User_View.Draw" which, being an I/O type of operation, one suspects may
>> block. Now, digging into the Gnoga and GNAT source code, it seems that this
>> can, indeed, block (for example, on line 4190 of
>> GNAT.Sockets.Connection_State_Machine.HTTP_Server
>> (gnat-sockets-connection_state_machine-http_server.adb) there is the call
>> "WebSocket_Blocking_Send (Client, Header,  True, False);" Therefore, to
>> make that call within a protected procedure is technically a "bounded
>> error". To fix this, I think I would just need to change the protected
>> procedure to an entry, as protected entries may block.
>>
>> Cheers,
>> David
>>
>>
>>
>> Il giorno dom 22 apr 2018 alle ore 02:00 Pascal via Gnoga-list <
>> [email protected]> ha scritto:
>>
>>> Hello David,
>>>
>>> > Le 19 avr. 2018 à 11:23, David Trudgett <[email protected]> a
>>> écrit :
>>> >
>>> > In case anyone is interested, I made a few changes to the User Guide
>>> Gnogaboard example application to make Users a protected object for safe
>>> concurrent access.
>>> >
>>> > Attached is a diff showing the changes.
>>> >
>>> > Regards,
>>> > David
>>>
>>> Thanks for you contribution.
>>>
>>> Do you mind if I push your patch on Gnoga SF Git repo?
>>>
>>> Regards, Pascal.
>>> http://blady.pagesperso-orange.fr
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Check out the vibrant tech community on one of the world's most
>>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>>> _______________________________________________
>>> Gnoga-list mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/gnoga-list
>>>
>> --
>>
>> David K. Trudgett
>> IT Systems and Software Engineer
>> Ph: 0467 312 782 (mobile)
>> Email: [email protected] <[email protected]>
>> Web: http://www.eclecticse.com.au/ (blog)
>> LinkedIn: https://au.linkedin.com/in/david-trudgett-6191ba103
>> ABN: 87 984 125 899
>>
> --
>
> David K. Trudgett
> IT Systems and Software Engineer
> Ph: 0467 312 782 (mobile)
> Email: [email protected] <[email protected]>
> Web: http://www.eclecticse.com.au/ (blog)
> LinkedIn: https://au.linkedin.com/in/david-trudgett-6191ba103
> ABN: 87 984 125 899
>
-- 

David K. Trudgett
IT Systems and Software Engineer
Ph: 0467 312 782 (mobile)
Email: [email protected] <[email protected]>
Web: http://www.eclecticse.com.au/ (blog)
LinkedIn: https://au.linkedin.com/in/david-trudgett-6191ba103
ABN: 87 984 125 899
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gnoga-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gnoga-list

Reply via email to