Tag:lock

  • Solving the problem of locking golang global variables

    Time:2021-8-4

    If the global variable is only read, it naturally does not need to be locked If the global variable is read and written by multiple processes, it naturally needs to be locked But what if only one process writes the global variable and other processes read it? If the cow method is adopted, and the […]

  • Ubuntu e: unable to get lock / var / lib / dpkg / lock front – Open (11: resource temporarily unavailable)

    Time:2021-6-12

    Ubuntu 18.04, the same with other versions of Ubuntu Question: When running sudo apt get install / update / or other commands, the following prompt sometimes appears due to various unclear reasons: E: Unable to get lock / var / lib / dpkg / lock front – Open (11: resource temporarily unavailable) E: Unable to […]

  • Spring annotation and synchronization lock cannot be synchronized

    Time:2021-5-13

    This article mainly introduces the spring annotation and synchronization lock can not be synchronized to solve the problem, the article through the example code is very detailed, for everyone’s study or work has a certain reference learning value, need friends can refer to Conclusion: if the transaction and synchronization lock are used simultaneously in the […]

  • Java Multithread concurrent programming and lock principle analysis

    Time:2021-4-30

    This article mainly introduces the Java multithreading concurrent programming and lock principle analysis, the article through the example code introduction is very detailed, for everyone’s study or work has a certain reference learning value, need friends can refer to 1、 Preface Recently, the project has encountered the situation of multithreading concurrency (concurrent order grabbing & […]

  • Introduction and use of lock in IOS

    Time:2021-3-13

    Multithreading is often used in normal development. In the process of using multithreading, it is inevitable to encounter the problem of resource competition. How can we avoid this problem? What is thread safety? When a thread accesses data, other threads cannot access it until the thread has finished accessing. In short, there is only one […]

  • Using VBScript to enable caps lock key

    Time:2021-2-6

    Q:Hi, scripting guy! I have a script where users enter some information in an Input  box.The  information needs to be entered in all-capital letters, so my instructions say, “Please make sure the Caps Lock key is on before entering the information.”They don’t always do that,   however.Is  there a way to turn the Caps Lock key on and off using a script?— BW, Medford, OR A:Hey, BW.We don’t know of a way to turn the Caps Lock key on and off, but we do know a way to mimic the effect of having the Caps Lock key on.After all, the whole point of the Caps Lock key is to turn everything you type into uppercase letters.For example, you might type this: this is my sentence. But Caps Lock will make it appear on screen like this: THIS IS MY SENTENCE. So how can we achieve the same effect in a script? We just use the VBScript function ucase, which switches all the letters in a string to their uppercase equivalent.For  example,  here’s a simple two-line script that gathers information from a user and then uses the UCase function to switch all the letters to uppercase when echoing the value to the screen:strMessage = InputBox(“Please enter your message:”)Wscript.Echo UCase(strMessage) Incidentally, the above script doesn’t actually change the case of the letters in the string strMessage; it just displays them in uppercase.If you really want all the letters converted to uppercase, try this script instead: strMessage = UCase(InputBox(“Please enter your message:”))Wscript.Echo strMessage Looks crazy, but it works. For more information about the ucase function, […]

  • Transaction, index, lock principle and usage analysis of MySQL knowledge points

    Time:2020-11-18

    This paper introduces the transaction, index, lock principle and usage of MySQL knowledge points. For your reference, the details are as follows: affair Transaction concept A transaction is a set of atomic SQL queries, or an independent unit of work. If the database engine executes a set of operation statements, then all operations will be […]

  • Analysis of Java lock synchronous lock using instance

    Time:2020-11-5

    This article mainly introduces the Java lock synchronization lock use example analysis, the article through the example code introduction is very detailed, has the certain reference study value to everybody’s study or the work, needs the friend may refer to 1) Lock is an interface, while synchronized is a keyword in Java. Synchronized is a […]

  • Summary of MySQL index, lock and transaction knowledge

    Time:2020-11-1

    This paper summarizes the knowledge points of MySQL index, lock and transaction. For your reference, the details are as follows: 1. Index Index, similar to the table of contents of books, can immediately find the corresponding record according to a page number of the table of contents. Advantages of index: Natural order. Quick search. Disadvantages […]

  • How Python uses redis to build distributed locks

    Time:2020-10-31

    This article mainly introduces how Python uses redis to build distributed locks. This article introduces in detail the example code, which has a certain reference learning value for everyone’s study or work. Friends in need can refer to it In the actual application scenario, we may have multiple workers, which may be in one machine […]

  • Summary of MySQL lock knowledge

    Time:2020-9-14

    The concept of lock ① Lock, in real life, is a tool that we want to hide from the outside world. ② In a computer, it is a mechanism to coordinate multiple processes or threads to access a resource concurrently. ③ In the database, in addition to the traditional computing resources (CPU, ram, I / […]

  • How Java annotations implement distributed locks based on redission

    Time:2020-6-29

    This article mainly introduces how to realize the distributed lock based on Redission with Java annotation. The sample code in this article is very detailed, which has a certain reference value for everyone to learn or work 1. Define annotation class @Target({ ElementType.METHOD }) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface DistributedLock { //Lock name String lockName() default […]