mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 08:26:27 +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
894952afe3
commit
f622747b24
2 changed files with 5 additions and 3 deletions
|
@ -36,7 +36,8 @@ int main (int argc, char *argv[])
|
|||
initWithObjectFunction: handle_incoming_packet]
|
||||
autorelease]];
|
||||
|
||||
[in_port addToRunLoop: [RunLoop currentInstance] forMode: nil];
|
||||
[[RunLoop currentInstance] addPort: in_port
|
||||
forMode: RunLoopDefaultMode];
|
||||
|
||||
for (i = 0; i < 10; i++)
|
||||
{
|
||||
|
|
|
@ -76,8 +76,9 @@ int main (int argc, char *argv[])
|
|||
[[[ObjectFunctionInvocation alloc]
|
||||
initWithObjectFunction: handle_incoming_packet]
|
||||
autorelease]];
|
||||
[port addToRunLoop: [RunLoop currentInstance] forMode: nil];
|
||||
[[RunLoop currentInstance] run];
|
||||
[[RunLoop currentInstance] addPort: port
|
||||
forMode: RunLoopDefaultMode];
|
||||
[RunLoop run];
|
||||
#else
|
||||
{
|
||||
id packet;
|
||||
|
|
Loading…
Reference in a new issue