Multi-thread control method and terminal equipment
A control method and multi-thread technology, applied in the directions of multi-programming device, resource allocation, etc., can solve problems such as camera abnormality and non-compliance, and achieve the effect of avoiding abnormality and avoiding adverse effects.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment
[0125] Example: Combined Figure 4 As shown, the camera is opened and the camera is previewed, the initial value is 1, and the target value is 0 as an example.
[0126] S401. If it is necessary to open the camera in the first thread, set the status flag of the shared lock to 1 in the first thread, and block the first thread; in the polling sub-thread, poll the status flag of the shared lock ;
[0127] Wherein, the shared lock is a global lock, and each thread can set the shared lock.
[0128] Moreover, blocking the first thread means controlling the first thread to be in a blocked state.
[0129] S402, in the second thread, execute a specific camera opening program, and determine whether the camera is successfully opened according to the callback; if it is successfully opened, then set the status flag of the shared lock to 0 in the second thread, and execute S403; if not successful Open, keep the state of the shared lock marked as 1 in the second thread, and notify the user...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com