Home » Community » Newbie corner » Program didn't exit in Task Manager after click [X]
Re: Program didn't exit in Task Manager after click [X] [message #55406 is a reply to message #55405] |
Sun, 08 November 2020 13:03 |
Oblivion
Messages: 1135 Registered: August 2007
|
Senior Contributor |
|
|
Hello peterh,
Just to clarify TcpSocket behaviour and its relation to Upp::Null:
Upp::TcpSocket uses a "pseudo-blocking" mechanism.
This means, the platform specific, underlying socket is always in non-blocking mode.
This is by design. From the user's POV, this allow us to use the TcpSocket in blocking, non-blocking, or in a time-constrained mode, easily, depending on our specific use-case.
Enter "Null" value.
Upp::Null, as you've noticed, is a Upp-specific value. It is already defined for int, int64, double and bool types (and can be used wtih other types that define a Nuller). So you should make no assumptions about it.
Null / 100000 can semantically be considered an "undefined behaviour", because we are trying to divide something that doesn't exist.
Hence, timeout = Null, means that there is no timeout.
int foo1 = Null; // Ok
int64 foo2 = (int) Null; // Not OK! This can be considered a user error.
int64 foo3 = Null; // OK.
Null, assigned to timeout (int), in this context, is used to put the TcpSocket in blocking mode. OTOH, "0" (int) is used to put the TcpSocket into non-blocking mode.
timeout > 0 && timeout <= INT_MAX is a time-constraint (in miliseconds) for a given TcpSocket operation.
Best regards,
Oblivion
Github page: https://github.com/ismail-yilmaz
upp-components: https://github.com/ismail-yilmaz/upp-components
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
[Updated on: Sun, 08 November 2020 13:34] Report message to a moderator
|
|
|
|
|
Program didn't exit in Task Manager after click [X]
|
|
|
Re: Program didn't exit in Task Manager after click [X]
By: mirek on Mon, 26 October 2020 08:47
|
|
|
Re: Program didn't exit in Task Manager after click [X]
|
|
|
Re: Program didn't exit in Task Manager after click [X]
By: peterh on Thu, 05 November 2020 13:51
|
|
|
Re: Program didn't exit in Task Manager after click [X]
By: peterh on Sat, 07 November 2020 07:53
|
|
|
Re: Program didn't exit in Task Manager after click [X]
By: Klugier on Sat, 07 November 2020 11:37
|
|
|
Re: Program didn't exit in Task Manager after click [X]
By: peterh on Sat, 07 November 2020 12:01
|
|
|
Re: Program didn't exit in Task Manager after click [X]
By: peterh on Sat, 07 November 2020 14:03
|
|
|
Re: Program didn't exit in Task Manager after click [X]
By: peterh on Sat, 07 November 2020 20:25
|
|
|
Re: Program didn't exit in Task Manager after click [X]
By: Oblivion on Sun, 08 November 2020 13:03
|
|
|
Re: Program didn't exit in Task Manager after click [X]
By: peterh on Sun, 08 November 2020 13:39
|
|
|
Re: Program didn't exit in Task Manager after click [X]
By: Oblivion on Sun, 08 November 2020 14:32
|
Goto Forum:
Current Time: Fri Nov 01 00:47:41 CET 2024
Total time taken to generate the page: 0.01842 seconds
|