Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(api): new api to save input history without cleaning up sessions #766

Closed
wants to merge 1 commit into from

Conversation

WhiredPlanck
Copy link
Contributor

Pull request

Issue tracker

Fixes will automatically close the related issue

Fixes #754

Feature

Describe feature of pull request

Unit test

  • Done

Manual test

  • Done

Code Review

  1. Unit and manual test pass
  2. GitHub Action CI pass
  3. At least one contributor reviews and votes
  4. Can be merged clean without conflicts
  5. PR will be merged by rebase upstream base

Additional Info

Copy link
Member

@lotem lotem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need proof it will work in thread-safe manner.

@@ -465,6 +466,7 @@ typedef struct rime_api_t {
Bool (*deploy_config_file)(const char* file_name, const char* version_key);

Bool (*sync_user_data)(void);
Bool (*sync_user_dict)(void);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't insert new API functions.

@@ -167,6 +167,11 @@ RIME_API Bool RimeSyncUserData() {
return Bool(deployer.StartMaintenance());
}

RIME_API Bool RimeSyncUserDict() {
Deployer& deployer(Service::instance().deployer());
return Bool(deployer.ScheduleTask("user_dict_sync"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this safe to do while user input session accesses user dictionary simutaniously?

@@ -167,6 +167,11 @@ RIME_API Bool RimeSyncUserData() {
return Bool(deployer.StartMaintenance());
}

RIME_API Bool RimeSyncUserDict() {
Deployer& deployer(Service::instance().deployer());
return Bool(deployer.ScheduleTask("user_dict_sync"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it working? It doesn't look like actually running the task.

@lotem
Copy link
Member

lotem commented Feb 7, 2024

I believe the code is not working as expected.

@lotem lotem closed this Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API to write user input history to disk
2 participants