mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 08:41:03 +00:00
(main): Add port to run loop using new scheme.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@1190 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f7f962e140
commit
bef18bde62
2 changed files with 5 additions and 3 deletions
|
@ -36,7 +36,8 @@ int main (int argc, char *argv[])
|
||||||
initWithObjectFunction: handle_incoming_packet]
|
initWithObjectFunction: handle_incoming_packet]
|
||||||
autorelease]];
|
autorelease]];
|
||||||
|
|
||||||
[in_port addToRunLoop: [RunLoop currentInstance] forMode: nil];
|
[[RunLoop currentInstance] addPort: in_port
|
||||||
|
forMode: RunLoopDefaultMode];
|
||||||
|
|
||||||
for (i = 0; i < 10; i++)
|
for (i = 0; i < 10; i++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -76,8 +76,9 @@ int main (int argc, char *argv[])
|
||||||
[[[ObjectFunctionInvocation alloc]
|
[[[ObjectFunctionInvocation alloc]
|
||||||
initWithObjectFunction: handle_incoming_packet]
|
initWithObjectFunction: handle_incoming_packet]
|
||||||
autorelease]];
|
autorelease]];
|
||||||
[port addToRunLoop: [RunLoop currentInstance] forMode: nil];
|
[[RunLoop currentInstance] addPort: port
|
||||||
[[RunLoop currentInstance] run];
|
forMode: RunLoopDefaultMode];
|
||||||
|
[RunLoop run];
|
||||||
#else
|
#else
|
||||||
{
|
{
|
||||||
id packet;
|
id packet;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue