CHEN Wen-yu, CHEN Fu, YU Sheng-ji, SUN Shi-xin. Analysis and Improvement for Synchronous Thread Model Based on Java[J]. Journal of University of Electronic Science and Technology of China, 2010, 39(3): 430-434. DOI: 10.3969/j.issn.1001-0548.2010.03.023
Citation: CHEN Wen-yu, CHEN Fu, YU Sheng-ji, SUN Shi-xin. Analysis and Improvement for Synchronous Thread Model Based on Java[J]. Journal of University of Electronic Science and Technology of China, 2010, 39(3): 430-434. DOI: 10.3969/j.issn.1001-0548.2010.03.023

Analysis and Improvement for Synchronous Thread Model Based on Java

  • Java supports threading at language level. In order to synchronize, Java provides keyword “synchronized” and mechanisms like wait() for Object, however, the potential imperfectness of the mechanisms may trigger unpredictable results. Currently, “Band Aid” class library is often used to solve the synchronize problem of Java thread model, but it is hard to optimize the class library. The paper discusses drawbacks of Java threading mechanism, extends the grammar of synchronized keyword for accepting multiple parameters and a timeout callback; redefines wait() method for returning a boolean variable to solve the timeout detection issue. The synchronize issue is solved by using syntax extension methods to guarantee the stability, reliability and optimized attributes of the programs developed by Java threads.
  • loading

Catalog

    /

    DownLoad:  Full-Size Img  PowerPoint
    Return
    Return