[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode fd61209f54 3/8: Got serial multi-threading wo
From: |
Christian Johansson |
Subject: |
[elpa] externals/phps-mode fd61209f54 3/8: Got serial multi-threading working with 2 separate threads instead of 1 |
Date: |
Wed, 23 Mar 2022 12:27:10 -0400 (EDT) |
branch: externals/phps-mode
commit fd61209f54907c058f529edd3686a74389aa52b9
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>
Got serial multi-threading working with 2 separate threads instead of 1
---
phps-mode-serial.el | 54 ++++++++++++++++++++++++++++++++++++++---------------
1 file changed, 39 insertions(+), 15 deletions(-)
diff --git a/phps-mode-serial.el b/phps-mode-serial.el
index 4b104dac8a..73e2a93701 100644
--- a/phps-mode-serial.el
+++ b/phps-mode-serial.el
@@ -159,18 +159,31 @@
;; First execute start lambda
(condition-case conditions
(let ((return (funcall start)))
- (setq start-return (list 'success return
start-time)))
- (error (setq start-return (list 'error conditions
start-time))))
+ (setq
+ start-return
+ (list 'success return start-time)))
+ (error
+ (setq
+ start-return
+ (list 'error conditions start-time))))
;; Profile execution in debug mode
(when phps-mode-serial--profiling
(let* ((end-time (current-time))
(end-time-float
- (+ (car end-time) (car (cdr end-time)) (* (car
(cdr (cdr end-time))) 0.000001)))
+ (+
+ (car end-time)
+ (car (cdr end-time))
+ (* (car (cdr (cdr end-time))) 0.000001)))
(start-time-float
- (+ (car start-time) (car (cdr start-time)) (*
(car (cdr (cdr start-time))) 0.000001)))
+ (+
+ (car start-time)
+ (car (cdr start-time))
+ (* (car (cdr (cdr start-time))) 0.000001)))
(elapsed (- end-time-float start-time-float)))
- (message "Serial asynchronous thread start finished,
elapsed: %fs" elapsed)))
+ (message
+ "Serial asynchronous thread start finished,
elapsed: %fs"
+ elapsed)))
start-return))
key)))
@@ -180,9 +193,8 @@
phps-mode-serial--async-threads)
(make-thread
- `(lambda()
- (let ((start-return
- (thread-join ,async-thread))
+ (lambda()
+ (let ((start-return (thread-join async-thread))
(end-return))
(let ((status (car start-return))
(value (car (cdr start-return)))
@@ -194,18 +206,31 @@
;; Then execute end lambda
(condition-case conditions
(let ((return (funcall end value)))
- (setq end-return (list 'success return
start-time)))
- (error (setq end-return (list 'error conditions
start-time))))
+ (setq
+ end-return
+ (list 'success return start-time)))
+ (error
+ (setq
+ end-return
+ (list 'error conditions start-time))))
;; Profile execution
(when phps-mode-serial--profiling
(let* ((end-time (current-time))
(end-time-float
- (+ (car end-time) (car (cdr end-time)) (*
(car (cdr (cdr end-time))) 0.000001)))
+ (+
+ (car end-time)
+ (car (cdr end-time))
+ (* (car (cdr (cdr end-time))) 0.000001)))
(start-time-float
- (+ (car start-time) (car (cdr start-time))
(* (car (cdr (cdr start-time))) 0.000001)))
+ (+
+ (car start-time)
+ (car (cdr start-time))
+ (* (car (cdr (cdr start-time)))
0.000001)))
(elapsed (- end-time-float
start-time-float)))
- (message "Serial asynchronous thread end
finished, elapsed: %fs" elapsed)))
+ (message
+ "Serial asynchronous thread end finished,
elapsed: %fs"
+ elapsed)))
(let ((status (car end-return))
(value (car (cdr end-return))))
@@ -224,8 +249,7 @@
(with-current-buffer key
(setq phps-mode-serial--status 'error))
(when start-error
- (funcall start-error value)))))
- end-return)))))
+ (funcall start-error value))))))))))
(let ((start-return)
(end-return))
- [elpa] externals/phps-mode updated (246bcc6967 -> 3a09d15aa1), Christian Johansson, 2022/03/23
- [elpa] externals/phps-mode 3a09d15aa1 8/8: Updated version and changelog, Christian Johansson, 2022/03/23
- [elpa] externals/phps-mode d45658d99c 1/8: Starting experimenting with using two threads for serial commands, Christian Johansson, 2022/03/23
- [elpa] externals/phps-mode 9498a7ae53 7/8: Updated TODOs, Christian Johansson, 2022/03/23
- [elpa] externals/phps-mode b13cf27bf0 5/8: Removed unused variables, Christian Johansson, 2022/03/23
- [elpa] externals/phps-mode fd61209f54 3/8: Got serial multi-threading working with 2 separate threads instead of 1,
Christian Johansson <=
- [elpa] externals/phps-mode 2e249e5c24 4/8: Moved bookkeeping and imenu generation to separate thread, Christian Johansson, 2022/03/23
- [elpa] externals/phps-mode e0389c235f 6/8: Using separate error catching for imenu and bookkeeping generation, Christian Johansson, 2022/03/23
- [elpa] externals/phps-mode d6323a5548 2/8: Moved imenu and bookkeeping to main thread, Christian Johansson, 2022/03/23