Skip to content

How does touch events get the control of main-thread ? #1

@duduWang20

Description

@duduWang20

We all known that all touch events are sent directly to main thread without runloop's dispatch mechanism . How does this happens ?
It there a mechanism , something like runloop , trigger it directly on the main thread ?
Or it is the hardware or the main thread's or the main run loop's special mechanism ?

1   UIKit                               0x0000000108e2261d -[UIWindow _sendTouchesForEvent:] + 2317
2   UIKit                               0x0000000108e23f2a -[UIWindow sendEvent:] + 4124
3   UIKit                               0x0000000108dc7365 -[UIApplication sendEvent:] + 352
4   UIKit                               0x0000000109713a1d __dispatchPreprocessedEventFromEventQueue + 2809
5   UIKit                               0x0000000109716672 __handleEventQueueInternal + 5957
6   UIKit                               0x0000000109716a76 __handleEventQueueInternal + 6985
7   CoreFoundation                      0x0000000108631101 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
8   CoreFoundation                      0x00000001086d0f71 __CFRunLoopDoSource0 + 81
9   CoreFoundation                      0x0000000108615a6b __CFRunLoopDoSources0 + 267
10  CoreFoundation                      0x0000000108614fff __CFRunLoopRun + 1279
11  CoreFoundation                      0x0000000108614889 CFRunLoopRunSpecific + 409
12  GraphicsServices                    0x000000010ed809c6 GSEventRunModal + 62
13  UIKit                               0x0000000108dab5d6 UIApplicationMain + 159
14  tt                                  0x000000010741433f main + 111
15  libdyld.dylib                       0x000000010c355d81 start + 1
16  ???                                 0x0000000000000001 0x0 + 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions