vim-jp / vim-jp/vital.vim

Info: Windows reject speedy

Open
#718 0 comments 0 reactions 1 assignee View on GitHub

@tsuyoshicho is already working on this.

Since Feb 5, 2020.

Dominant language
Vim Script
Stars
587
Forks
64
Avg merge
2d 8h
Merged PRs (30d)
1

Description

#717 related issue.

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Jan 24 2020 19:52:19)
MS-Windows 64 ビット GUI/コンソール 版 with OLE サポート
適用済パッチ: 1-147

vim-tux x64 on Windows 10

test code

function s:test() abort
  let P = vital#vital#import('Async.Promise')

  " Constants
  let PENDING = 0
  let FULFILLED = 1
  let REJECTED = 2

  " Utilities
  let Wait = {ms -> P.new({res -> timer_start(ms, res)})}
  let p = Wait(200).then({ -> 'resolved' })
  let s = reltime()
  echo p._state ' ' PENDING
  echo P.wait(p, { 'interval': 1000 }) ' ' ['resolved', v:null]
  echo reltimefloat(reltime(s)) * 1000 ' >= ' 1000
  echo reltimefloat(reltime(s)) * 1000 ' <= ' 2000

  let p = Wait(200).then({ -> P.reject('rejected') })
  let s = reltime()
  echo p._state ' ' PENDING
  echo P.wait(p, { 'interval': 1000 }) ' ' [v:null, 'rejected']
  echo reltimefloat(reltime(s)) * 1000 ' >= ' 1000
  echo reltimefloat(reltime(s)) * 1000 ' <= ' 2000
endfunction

call s:test()

result


0   0
['resolved', v:null]   ['resolved', v:null]
1007.9319  >=  1000
1007.9627  <=  2000
0   0
[v:null, 'rejected']   [v:null, 'rejected']
988.8081  >=  1000
988.8189  <=  2000

https://github.com/vim-jp/vital.vim/blob/91177736ea63b3e7e6093ef3e60ba215c2f27437/test/Async/Promise.vimspec#L765-L779

My test failed log.
https://github.com/tsuyoshicho/vital.vim/runs/426681919

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.