mirror of
https://github.com/gnosygnu/xowa.git
synced 2024-10-27 20:34:16 +00:00
Threading: Fix rare multi-thread error for Hiero parser
This commit is contained in:
parent
3b4a3a5af5
commit
2776790369
@ -9,6 +9,6 @@
|
||||
<classpathentry kind="lib" path="lib/mysql-connector-java-5.1.12-bin.jar"/>
|
||||
<classpathentry kind="lib" path="lib/postgresql-8.4-701.jdbc4.jar"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="lib" path="lib/sqlite-jdbc-3.8.11.2.jar"/>
|
||||
<classpathentry kind="lib" path="lib/sqlite-jdbc-3.18.0.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
@ -22,6 +22,7 @@ class Hiero_parser {
|
||||
private Hiero_block cur_block;
|
||||
private Bry_bfr cur_tkn = Bry_bfr_.Reset(16);
|
||||
public Hiero_block[] Parse(byte[] src, int bgn, int end) {
|
||||
synchronized (blocks) { // TS:needed b/c blocks, cur_block, etc are member vars DATE:2017-05-26
|
||||
blocks.Clear();
|
||||
this.cur_block = new Hiero_block();
|
||||
cur_tkn.Clear();
|
||||
@ -65,6 +66,7 @@ class Hiero_parser {
|
||||
this.New_block();// flush remaining items
|
||||
return (Hiero_block[])blocks.To_ary_and_clear(Hiero_block.class);
|
||||
}
|
||||
}
|
||||
private void New_block() {
|
||||
this.New_token(null);
|
||||
if (cur_block.Len() > 0) {
|
||||
|
@ -1 +1 @@
|
||||
update
|
||||
download_central update
|
||||
|
Loading…
Reference in New Issue
Block a user