Mercurial Hosting > luan
comparison src/luan/modules/http/LuanHandler.java @ 1351:21b153b4bcc4
better reset_luan for luanhost
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Mon, 04 Mar 2019 12:12:45 -0700 |
parents | d8754a50adf1 |
children | 1d31c1f3ea30 |
comparison
equal
deleted
inserted
replaced
1350:d8754a50adf1 | 1351:21b153b4bcc4 |
---|---|
156 lock.readLock().unlock(); | 156 lock.readLock().unlock(); |
157 } | 157 } |
158 } | 158 } |
159 | 159 |
160 public void reset_luan() { | 160 public void reset_luan() { |
161 new Thread() { | 161 lock.writeLock().lock(); |
162 public void run() { | 162 try { |
163 lock.writeLock().lock(); | 163 close(); |
164 try { | 164 currentLuan = newLuan(); |
165 close(); | 165 } finally { |
166 currentLuan = newLuan(); | 166 lock.writeLock().unlock(); |
167 } finally { | 167 } |
168 lock.writeLock().unlock(); | |
169 } | |
170 } | |
171 }.start(); | |
172 } | 168 } |
173 | 169 |
174 public void disable_luan() { | 170 public void disable_luan() { |
175 isDisabled = true; | 171 isDisabled = true; |
176 } | 172 } |