Abstract: Multithreaded programming is an important part of modern software technology. To understand multithreading, this involves multiple processes. This article mainly makes some conclusions about multi-thread programming and multi-thread programming related knowledge. Multithreaded programming is an important feature of the Java language. The meaning of multithreaded programming is to divide the program task into several parallel subtasks. Especially in network programming, you will find that many functions can be executed concurrently. For example, the network transmission speed is slow and the user input speed is slow. You can use two independent threads to complete these two functions without affecting the normal display or other functions. Multi-threading is compared with single-threading. Ordinary Windows uses a single-threaded program structure. Its working principle is: the main program has a message loop, and constantly reads messages from the message queue to determine what to do next. It is for a function, and the main program can receive another message to execute after the function is executed. For example, the function of a sub-function is to read a network data, or read a file, and only wait for the data or file to read before receiving the next message. You can't do anything while executing this subfunction. But often reading network data and waiting for user input has a lot of time waiting, multi-threaded use this feature to divide the task into multiple concurrent tasks, you can solve this problem. 1. Program: An executable application generated by source code. (eg QQ.app) 2. Process: A running program can be seen as a process. (Running QQ is a process), the process has all the resources needed to run independently. 3. Thread: A code segment that runs independently in the program. (eg: the code block that receives the QQ message) A process is composed of one or more threads. The process is only responsible for the scheduling and allocation of resources. The thread is the real execution unit of the program and is responsible for the execution of the code. 1. Each running program (ie, a process) contains at least one thread, and this thread is called the main thread. 2. The main thread is created at program startup to execute the main function. 3. A program with only one main thread, called a single-threaded program. 4. The main thread is responsible for executing all the code of the program (UI presentation and refresh, network request, local request). These codes can only be executed sequentially and cannot be executed concurrently. Note: UI presentations and refreshes can only be written in the main thread. 1, a program with multiple threads, called a multi-threaded program. 2, iOS allows users to open new threads themselves, these threads, called sub-threads, relative to the main thread. 3. The child thread and the main thread are independent units, and their respective executions do not affect each other, so they can be executed concurrently. Supplementary multithreading basics 4, iOS default allocation of 1M stack space to the main thread, the default allocation of 512K stack space to the child thread. (The number of bytes allocated must be an integer multiple of 4K) 5, the allocated space is used to store the space opened for the variables in the thread, generally enough to use. 6. Unlike the stack space, the main thread and the child thread share the same memory space. 7. The automatic release pool is set by default at the program entry, and the main thread is responsible for executing the code. The newly opened memory of the child thread is not within the jurisdiction of the main thread (the threads do not interfere with each other and are independent of each other), so the space opened by the child thread for the object is not automatically released, and the automatic release pool is manually added for the child thread. 8, using a static method to open a large amount of memory space in a short time or using a loopable convenience constructor, will cause the memory to instantly aggregate, the program carsh off, so write @autorelease pool. 9, multi-threaded types Out of thread: The thread is destroyed after the end of the thread, and the child thread may be out of the thread. Single-threaded program: only one thread, code execution, easy to block code (page suspended) Multi-threaded program: There are multiple threads, and the threads run independently. It can effectively avoid code blocking and improve the running performance of the program. Programs written in Java are run in the Java Virtual Machine (JVM). Inside the JVM, multitasking of programs is done through threads. Each time you start a java application with the java command, it will start a JVM process. In the same JVM process, there is one and only one process, which is itself. In this JVM environment, all program code runs in threads. The JVM finds the entry point main() of the program, and then runs the main() method, which produces a thread called the main thread. When the main method ends, the main thread runs. The JVM process also exits. The operating system manages the process threads, assigning each process in turn (without a fixed order) for a short period of time (not necessarily evenly), and then within each process, the program code handles the time allocation of the internal threads of the process itself. The switching between multiple threads is performed, and the switching time is also very short. 9H Flexible Glass Screen Protector
This kind of Flexible Glass Screen Protective Film is made of nano-glass material and is an indispensable device for people who often drop their mobile phones. The Flexible Protective Film can be perfectly fixed on the mobile phone to completely protect the mobile phone screen to prevent scratches and cracks on the edge of the mobile phone screen.
The surface hardness is 9H hardness. Sharp objects (such as knives and keys) will not scratch the surface.
The high transparency of 0.22mm ensures that you can view all screen content clearly and clearly, while providing unique touch screen sensitivity.
The Screen Protection Film has an "oleophobic and waterproof" coating that prevents dust and fingerprint smudges and ensures that it can be easily removed.
In case the screen is damaged, the Screen Protector will break into small pieces that are not sharp, which is much safer than other glass screen protectors on the market.
If you want to know more about 9H Flexible Glass Screen Protector products, please click product details to view the parameters, models, pictures, prices and other information about 9H Flexible Glass Screen Protector products.
Whether you are a group or an individual, we will try our best to provide you with accurate and comprehensive information about 9H Flexible Glass Screen Protector!
9H Flexible Glass Screen Protector, 9H Screen Protector, 9H Flexible Protective Film, Flexible Protective Film Shenzhen Jianjiantong Technology Co., Ltd. , https://www.mct-sz.com