Questions tagged [cfrunloop]

49 questions
1
vote
0 answers

A very interesting crash log with Exception Type:"EXC_CRASH (SIGSEGV)"

  Firstly, the desymbolicated crash log is at the bottom. I cannot post all the content out of privacy reason. However the first 3 threads log is enough I thought, if you really want that please leave a message.   And here is the thing, depending on…
kimimaro
  • 1,263
  • 2
  • 12
  • 21
1
vote
1 answer

Mono compiler crashes when trying to compile a class that calls native code

I have the following class that maps some run loop calls from native code to C# using Mono (in a mac) and the compiler just doesn't work, it crashes all the time when trying to compile it. I have removed it to a separate project containing only this…
Maurício Linhares
  • 39,901
  • 14
  • 121
  • 158
0
votes
0 answers

Macos Application hangs when using NSDistributedNotificationCenter and CFRunLoopAddSource

I have MacOS application built using Qt. There I have created NSDistributedNotificationCenter to be notified when accessibility settings change (observing "com.apple.accessibility.api" ). Also I have CFRunLoopAddSource to monitor key pressed…
RuLoViC
  • 825
  • 7
  • 23
0
votes
1 answer

CFRunLoopRun() and NSTimer -> segmentation fault

Thanks in advance to anyone who is helping me. I've a simple daemon. I allocate a class and then start a scheduled & repeating NSTimer: [NSTimer scheduledTimerWithTimeInterval:3.0 target:self selector:@selector(usage3GviaSysctl) userInfo:nil…
YllierDev
  • 571
  • 4
  • 16
0
votes
2 answers

How to consume UI Events while loading data in the background

I have a little iPhone app that loads data from a web service. To make sure that nothing goes wrong while loading the data I create a semi-transparent view over the app and use CFRunloopRun() to wait until all the data is loaded in the background.…
Andy S.
  • 533
  • 2
  • 6
0
votes
1 answer

How to call recording Callback in custom CFRunLoop in iPhone

I am recording audio in iPhone .. This is my Audio Queue object AudioQueueNewInput( &audioDescription, recordingCallback, self, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode, 0, …
S.P.
  • 5,427
  • 11
  • 56
  • 83
0
votes
1 answer

Using Runloop in inside nsoperation for async tasks

I have a use case where I need to download many files using NSURLSession. To keep the sessiontasks from timing out I need to place them in an operation queue and limit the amount of concurrent downloads so they don't starve. My idea is that I will…
mac10688
  • 2,145
  • 2
  • 24
  • 37
0
votes
1 answer

Behave of nested CATransaction?

The code below will update the backgroundColor immediately after the commit. [CATransaction begin]; self.view.backgroundColor = [UIColor redColor]; [CATransaction commit]; sleep(5); But with nested explicit CATransactions, screen update only when…
Karl
  • 665
  • 4
  • 19
0
votes
1 answer

Looping a CFRunLoopSource

Here is the source files I'm currently developing. The idea behind this class is to contain a target object and selector which will be invoked in whatever CFRunLoop passed to scheduleInCFRunLoop. I need this to loop repeatedly without consuming all…
drreed
  • 1
  • 1
0
votes
1 answer

CFRunLoopRun called multiple times after setting UIImageView image

The Profiler shows that CFRunLoopRun is called more than 1000 times within 20 seconds, takes up 85% and all I was doing was scrolling. The UITableView scrolling seemed laggy and I don't know what's causing the problem and calling CFRunLoopRun…
Yannick
  • 3,210
  • 1
  • 21
  • 30
0
votes
1 answer

What's the purpose of CFRunLoopScheduleCallBack function in CFRunLoopSource?

I'm trying to define custom input source for CFRunLoop, I've read the Threading Programming Guide document wrote by Apple and this problem is the only one that I cannot understand. So, I want to know what is the purpose of CFRunLoopScheduleCallBack…
Sherlock
  • 13
  • 4
0
votes
2 answers

Need to CFRunLoopRun() but want it unblocking

I have the following piece of code in a cocoa Application for OSX: void *callbackInfo = NULL; // could put stream-specific data here. FSEventStreamRef stream; CFAbsoluteTime latency = 1.0; /* Latency in seconds */ …
Norbert
  • 735
  • 8
  • 19
0
votes
1 answer

Easiest way to add immediate task to a `CFRunLoop`?

What is the easiest way to add an immediate one-time task to a CFRunLoop from a C/C++ program, that is, a callback which must be invoked by the run-loop before it blocks again. According to the documentation, we have CFRunLoopPerformBlock(), but the…
Kristian Spangsege
  • 2,903
  • 1
  • 20
  • 43
0
votes
1 answer

Application got stuck with CPU usage up to 100%

My application stuck with CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION. In my application, I called an C function which is async. I show an waiting msg during the execution. When this function is terminated, it calls a delegate to close…
Duyen-Hoa
  • 15,384
  • 5
  • 35
  • 44
0
votes
1 answer

Callback method to Apple run loop

How to add a callback method to Apple event listener like: CFRunLoopSourceRef IOPSNotificationCreateRunLoopSource(IOPowerSourceCallbackType callback, void *context); How do i add a method or…
David Karlsson
  • 9,396
  • 9
  • 58
  • 103